chefstyle 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/chefstyle.yml +42 -0
- data/lib/chefstyle/version.rb +1 -1
- metadata +5 -11
- data/.gitignore +0 -9
- data/.rspec +0 -2
- data/.travis.yml +0 -15
- data/Gemfile +0 -4
- data/Rakefile +0 -30
- data/chefstyle.gemspec +0 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 360289d97b80eca841ffa20be478fcaad392ac2934e0dea20e17763c02c6fd23
|
|
4
|
+
data.tar.gz: 0ad54108181dfdd289e4f83897743c438ad5a5f884abb0ca9757124c251451fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0ab9fa0cd190c03c0de27bcfd76f5f8887820c6212b406291491f6271c17b6b50034be1d0ef2fdbc47c95c55d198c5f5e40713fef8fdbb3cf9fa6d9c2d3805a
|
|
7
|
+
data.tar.gz: fbc840097a36d3f79af3fa57155c9c75f57a07bd5774a72b0d2ac973342d34c0c719c796b9040f4b31ca6206366689552eebe246901a46b35b6c21a46e8a8e9d
|
data/config/chefstyle.yml
CHANGED
|
@@ -269,6 +269,7 @@ Layout/AccessModifierIndentation:
|
|
|
269
269
|
Enabled: true
|
|
270
270
|
Layout/AlignHash:
|
|
271
271
|
Enabled: true
|
|
272
|
+
EnforcedLastArgumentHashStyle: ignore_implicit
|
|
272
273
|
Style/AndOr:
|
|
273
274
|
Enabled: true
|
|
274
275
|
Style/ArrayJoin:
|
|
@@ -285,6 +286,8 @@ Style/CharacterLiteral:
|
|
|
285
286
|
Enabled: true
|
|
286
287
|
Style/ClassMethods:
|
|
287
288
|
Enabled: true
|
|
289
|
+
Layout/ClosingHeredocIndentation:
|
|
290
|
+
Enabled: true
|
|
288
291
|
Style/ColonMethodCall:
|
|
289
292
|
Enabled: true
|
|
290
293
|
Style/CommandLiteral:
|
|
@@ -293,6 +296,8 @@ Naming/ConstantName:
|
|
|
293
296
|
Enabled: true
|
|
294
297
|
Style/DefWithParentheses:
|
|
295
298
|
Enabled: true
|
|
299
|
+
Layout/DotPosition:
|
|
300
|
+
Enabled: True
|
|
296
301
|
Style/EachForSimpleLoop:
|
|
297
302
|
Enabled: true
|
|
298
303
|
Layout/ElseAlignment:
|
|
@@ -320,12 +325,18 @@ Style/For:
|
|
|
320
325
|
Enabled: true
|
|
321
326
|
Style/FrozenStringLiteralComment:
|
|
322
327
|
Enabled: true
|
|
328
|
+
Style/HashSyntax:
|
|
329
|
+
Enabled: true
|
|
330
|
+
Naming/HeredocDelimiterCase:
|
|
331
|
+
Enabled: true
|
|
323
332
|
Style/IfUnlessModifierOfIfUnless:
|
|
324
333
|
Enabled: true
|
|
325
334
|
Style/IfWithSemicolon:
|
|
326
335
|
Enabled: true
|
|
327
336
|
Layout/IndentAssignment:
|
|
328
337
|
Enabled: true
|
|
338
|
+
Layout/IndentHeredoc:
|
|
339
|
+
Enabled: true
|
|
329
340
|
Layout/IndentationConsistency:
|
|
330
341
|
Enabled: true
|
|
331
342
|
Layout/IndentationWidth:
|
|
@@ -336,6 +347,8 @@ Layout/InitialIndentation:
|
|
|
336
347
|
Enabled: true
|
|
337
348
|
Style/LambdaCall:
|
|
338
349
|
Enabled: true
|
|
350
|
+
Layout/LeadingCommentSpace:
|
|
351
|
+
Enabled: true
|
|
339
352
|
Style/MethodDefParentheses:
|
|
340
353
|
Enabled: true
|
|
341
354
|
Layout/MultilineBlockLayout:
|
|
@@ -353,6 +366,8 @@ Layout/MultilineOperationIndentation:
|
|
|
353
366
|
EnforcedStyle: indented
|
|
354
367
|
Style/MultilineTernaryOperator:
|
|
355
368
|
Enabled: true
|
|
369
|
+
Style/MutableConstant:
|
|
370
|
+
Enabled: true
|
|
356
371
|
Style/NegatedWhile:
|
|
357
372
|
Enabled: true
|
|
358
373
|
Style/NestedModifier:
|
|
@@ -395,6 +410,8 @@ Style/PercentLiteralDelimiters:
|
|
|
395
410
|
'%x': '{}'
|
|
396
411
|
Style/PercentQLiterals:
|
|
397
412
|
Enabled: true
|
|
413
|
+
Style/PreferredHashMethods:
|
|
414
|
+
Enabled: true
|
|
398
415
|
Style/RedundantBegin:
|
|
399
416
|
Enabled: true
|
|
400
417
|
Style/RedundantException:
|
|
@@ -471,6 +488,9 @@ Layout/TrailingBlankLines:
|
|
|
471
488
|
Enabled: true
|
|
472
489
|
Style/TrailingCommaInArguments:
|
|
473
490
|
Enabled: true
|
|
491
|
+
Style/TrailingCommaInHashLiteral:
|
|
492
|
+
Enabled: true
|
|
493
|
+
EnforcedStyleForMultiline: comma
|
|
474
494
|
# rubocop's default gets this completely backwards
|
|
475
495
|
Style/TrailingCommaInLiteral:
|
|
476
496
|
Enabled: true
|
|
@@ -481,6 +501,8 @@ Layout/TrailingWhitespace:
|
|
|
481
501
|
Enabled: true
|
|
482
502
|
Style/UnneededCapitalW:
|
|
483
503
|
Enabled: true
|
|
504
|
+
Style/UnneededInterpolation:
|
|
505
|
+
Enabled: false # buggy: https://github.com/rubocop-hq/rubocop/issues/6099
|
|
484
506
|
#Style/UnneededPercentQ: # would like to enable this one but its buggy as of 0.35.1
|
|
485
507
|
# Enabled: true
|
|
486
508
|
Naming/VariableName:
|
|
@@ -522,6 +544,8 @@ Layout/SpaceInsideParens:
|
|
|
522
544
|
Enabled: false
|
|
523
545
|
Layout/SpaceInsidePercentLiteralDelimiters:
|
|
524
546
|
Enabled: false
|
|
547
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
|
548
|
+
Enabled: false
|
|
525
549
|
|
|
526
550
|
# more whitespace cops that we allow since they can enhance readability
|
|
527
551
|
Layout/EmptyLinesAroundBlockBody:
|
|
@@ -602,3 +626,21 @@ Style/GuardClause:
|
|
|
602
626
|
# Let authors order gems however makes sense
|
|
603
627
|
Bundler/OrderedGems:
|
|
604
628
|
Enabled: false
|
|
629
|
+
|
|
630
|
+
# Naming cops produce fairly pointless makework (e.g. EOF on HEREDOC's is
|
|
631
|
+
# perfectly fine and understandable, using 'ip' as a parameter to a function
|
|
632
|
+
# is also perfectly descriptive even though its only 2 characters...).
|
|
633
|
+
Naming/HeredocDelimiterNaming:
|
|
634
|
+
Enabled: false
|
|
635
|
+
Naming/PredicateName:
|
|
636
|
+
Enabled: false
|
|
637
|
+
Naming/UncommunicativeMethodParamName:
|
|
638
|
+
Enabled: false
|
|
639
|
+
Naming/MemoizedInstanceVariableName:
|
|
640
|
+
Enabled: false
|
|
641
|
+
Naming/VariableNumber:
|
|
642
|
+
Enabled: false
|
|
643
|
+
|
|
644
|
+
# This breaks all kinds of specs in chef (i don't think it will ever quite work correctly)
|
|
645
|
+
Style/BracesAroundHashParameters:
|
|
646
|
+
Enabled: false
|
data/lib/chefstyle/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chefstyle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thom May
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -28,14 +28,14 @@ dependencies:
|
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '12.0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '12.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
@@ -74,15 +74,9 @@ executables:
|
|
|
74
74
|
extensions: []
|
|
75
75
|
extra_rdoc_files: []
|
|
76
76
|
files:
|
|
77
|
-
- ".gitignore"
|
|
78
|
-
- ".rspec"
|
|
79
|
-
- ".travis.yml"
|
|
80
|
-
- Gemfile
|
|
81
77
|
- LICENSE.txt
|
|
82
78
|
- README.md
|
|
83
|
-
- Rakefile
|
|
84
79
|
- bin/chefstyle
|
|
85
|
-
- chefstyle.gemspec
|
|
86
80
|
- config/chefstyle.yml
|
|
87
81
|
- config/default.yml
|
|
88
82
|
- config/disable_all.yml
|
|
@@ -111,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
111
105
|
version: '0'
|
|
112
106
|
requirements: []
|
|
113
107
|
rubyforge_project:
|
|
114
|
-
rubygems_version: 2.7.
|
|
108
|
+
rubygems_version: 2.7.7
|
|
115
109
|
signing_key:
|
|
116
110
|
specification_version: 4
|
|
117
111
|
summary: Rubocop configuration for Chef's ruby projects
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|
|
2
|
-
|
|
3
|
-
upstream = Gem::Specification.find_by_name("rubocop")
|
|
4
|
-
|
|
5
|
-
desc "Vendor rubocop-#{upstream.version} configuration into gem"
|
|
6
|
-
task :vendor do
|
|
7
|
-
src = Pathname.new(upstream.gem_dir).join("config")
|
|
8
|
-
dst = Pathname.new(__FILE__).dirname.join("config")
|
|
9
|
-
|
|
10
|
-
mkdir_p dst
|
|
11
|
-
cp(src.join("default.yml"), dst.join("upstream.yml"))
|
|
12
|
-
cp(src.join("enabled.yml"), dst.join("enabled.yml"))
|
|
13
|
-
cp(src.join("disabled.yml"), dst.join("disabled.yml"))
|
|
14
|
-
|
|
15
|
-
require 'rubocop'
|
|
16
|
-
require 'yaml'
|
|
17
|
-
cfg = RuboCop::Cop::Cop.all.inject({}) { |acc, cop| acc[cop.cop_name] = {"Enabled" => false}; acc }
|
|
18
|
-
File.open(dst.join("disable_all.yml"), "w"){|fh| fh.write cfg.to_yaml }
|
|
19
|
-
|
|
20
|
-
sh %{git add #{dst}/{upstream,enabled,disabled,disable_all}.yml}
|
|
21
|
-
sh %{git commit -m "Vendor rubocop-#{upstream.version} upstream configuration."}
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
require "chefstyle"
|
|
25
|
-
require "rubocop/rake_task"
|
|
26
|
-
RuboCop::RakeTask.new(:style) do |task|
|
|
27
|
-
task.options << "--display-cop-names"
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
task default: [:build, :install]
|
data/chefstyle.gemspec
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require 'chefstyle/version'
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |spec|
|
|
7
|
-
spec.name = "chefstyle"
|
|
8
|
-
spec.version = Chefstyle::VERSION
|
|
9
|
-
spec.authors = ["Thom May"]
|
|
10
|
-
spec.email = ["thom@chef.io"]
|
|
11
|
-
|
|
12
|
-
spec.summary = %q{Rubocop configuration for Chef's ruby projects}
|
|
13
|
-
spec.homepage = "https://github.com/chef/chefstyle"
|
|
14
|
-
spec.license = "Apache-2.0"
|
|
15
|
-
spec.required_ruby_version = ">= 2.2"
|
|
16
|
-
|
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
18
|
-
spec.executables = %w[chefstyle]
|
|
19
|
-
spec.require_paths = ["lib"]
|
|
20
|
-
|
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.10"
|
|
22
|
-
spec.add_development_dependency "rake", "~> 12.0"
|
|
23
|
-
spec.add_development_dependency "rspec"
|
|
24
|
-
spec.add_dependency("rubocop", Chefstyle::RUBOCOP_VERSION)
|
|
25
|
-
end
|