chefstyle 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f1328268c0f7916775b3004e5f3d708016455ebfae86fb7b8eae512425b505c
4
- data.tar.gz: 46214fd26c9461e2f133825e4a7244ecc673f391526b03f9983edf3e2d4ae13c
3
+ metadata.gz: '053739cd5b994c11a5577024d12eb39b2d238a203c6ee47eda28a90e33a1c845'
4
+ data.tar.gz: ef803fd295c1ad74bb5ddd0356ed203a2475d296d687f691f703a21a51c47fd2
5
5
  SHA512:
6
- metadata.gz: 222af4973c132b1efca844a12bb462dc7900339863a661f3a75f0bfb18280f73574145bbeb0dbd360e14dc1188dd72267f54af8b2671d01ba8a1b896f2b77525
7
- data.tar.gz: 81d07b51a8599d1f917622103c3959136cd4eb15fff33cd9b529c332c5f7757b81d5bf7ac5461f71655f7465152a0439ca4f2b79a644ca2a9b631a291879a7b6
6
+ metadata.gz: 7d846eef8d11920f2217f090cab0041a365ce031064495436dc7ff07d8aff6b60a9dd15620779b9fdcaf64ba9a9640615746c904b02ed0431204f67bac912395
7
+ data.tar.gz: 386c64563df8ee0150e75530068b8a4f2643d82c762ba2954c6d574a262155886ac7c215afc366ef9122931ffcd7a64432ea5d99a464c1af8f2dab9d67ecada4
@@ -20,15 +20,15 @@ Lint/AmbiguousRegexpLiteral:
20
20
  Enabled: true
21
21
  Lint/AssignmentInCondition:
22
22
  Enabled: true
23
- Lint/BlockAlignment:
23
+ Layout/BlockAlignment:
24
24
  Enabled: true
25
25
  Lint/CircularArgumentReference:
26
26
  Enabled: true
27
- Lint/ConditionPosition:
27
+ Layout/ConditionPosition:
28
28
  Enabled: true
29
29
  Lint/Debugger:
30
30
  Enabled: true
31
- Lint/DefEndAlignment:
31
+ Layout/DefEndAlignment:
32
32
  Enabled: true
33
33
  Lint/DeprecatedClassMethods:
34
34
  Enabled: true
@@ -50,7 +50,7 @@ Lint/EmptyInterpolation:
50
50
  Enabled: true
51
51
  Lint/EmptyWhen:
52
52
  Enabled: true
53
- Lint/EndAlignment:
53
+ Layout/EndAlignment:
54
54
  Enabled: true
55
55
  Lint/EndInMethod:
56
56
  Enabled: true
@@ -19,6 +19,8 @@ Layout/AlignHash:
19
19
  Enabled: false
20
20
  Layout/AlignParameters:
21
21
  Enabled: false
22
+ Layout/BlockAlignment:
23
+ Enabled: false
22
24
  Layout/BlockEndNewline:
23
25
  Enabled: false
24
26
  Layout/CaseIndentation:
@@ -29,10 +31,16 @@ Layout/ClosingParenthesisIndentation:
29
31
  Enabled: false
30
32
  Layout/CommentIndentation:
31
33
  Enabled: false
34
+ Layout/ConditionPosition:
35
+ Enabled: false
36
+ Layout/DefEndAlignment:
37
+ Enabled: false
32
38
  Layout/DotPosition:
33
39
  Enabled: false
34
40
  Layout/ElseAlignment:
35
41
  Enabled: false
42
+ Layout/EmptyComment:
43
+ Enabled: false
36
44
  Layout/EmptyLineAfterMagicComment:
37
45
  Enabled: false
38
46
  Layout/EmptyLineBetweenDefs:
@@ -55,6 +63,8 @@ Layout/EmptyLinesAroundModuleBody:
55
63
  Enabled: false
56
64
  Layout/EmptyLines:
57
65
  Enabled: false
66
+ Layout/EndAlignment:
67
+ Enabled: false
58
68
  Layout/EndOfLine:
59
69
  Enabled: false
60
70
  Layout/ExtraSpacing:
@@ -165,18 +175,14 @@ Lint/AmbiguousRegexpLiteral:
165
175
  Enabled: false
166
176
  Lint/AssignmentInCondition:
167
177
  Enabled: false
168
- Lint/BlockAlignment:
178
+ Lint/BigDecimalNew:
169
179
  Enabled: false
170
180
  Lint/BooleanSymbol:
171
181
  Enabled: false
172
182
  Lint/CircularArgumentReference:
173
183
  Enabled: false
174
- Lint/ConditionPosition:
175
- Enabled: false
176
184
  Lint/Debugger:
177
185
  Enabled: false
178
- Lint/DefEndAlignment:
179
- Enabled: false
180
186
  Lint/DeprecatedClassMethods:
181
187
  Enabled: false
182
188
  Lint/DuplicateCaseCondition:
@@ -197,8 +203,6 @@ Lint/EmptyInterpolation:
197
203
  Enabled: false
198
204
  Lint/EmptyWhen:
199
205
  Enabled: false
200
- Lint/EndAlignment:
201
- Enabled: false
202
206
  Lint/EndInMethod:
203
207
  Enabled: false
204
208
  Lint/EnsureReturn:
@@ -235,6 +239,10 @@ Lint/NextWithoutAccumulator:
235
239
  Enabled: false
236
240
  Lint/NonLocalExitFromIterator:
237
241
  Enabled: false
242
+ Lint/NumberConversion:
243
+ Enabled: false
244
+ Lint/OrderedMagicComments:
245
+ Enabled: false
238
246
  Lint/ParenthesesAsGroupedExpression:
239
247
  Enabled: false
240
248
  Lint/PercentStringArray:
@@ -275,7 +283,9 @@ Lint/UnderscorePrefixedVariableName:
275
283
  Enabled: false
276
284
  Lint/UnifiedInteger:
277
285
  Enabled: false
278
- Lint/UnneededDisable:
286
+ Lint/UnneededCopDisableDirective:
287
+ Enabled: false
288
+ Lint/UnneededCopEnableDirective:
279
289
  Enabled: false
280
290
  Lint/UnneededRequireStatement:
281
291
  Enabled: false
@@ -337,12 +347,18 @@ Naming/HeredocDelimiterCase:
337
347
  Enabled: false
338
348
  Naming/HeredocDelimiterNaming:
339
349
  Enabled: false
350
+ Naming/MemoizedInstanceVariableName:
351
+ Enabled: false
340
352
  Naming/MethodName:
341
353
  Enabled: false
342
354
  Naming/BinaryOperatorParameterName:
343
355
  Enabled: false
344
356
  Naming/PredicateName:
345
357
  Enabled: false
358
+ Naming/UncommunicativeBlockParamName:
359
+ Enabled: false
360
+ Naming/UncommunicativeMethodParamName:
361
+ Enabled: false
346
362
  Naming/VariableName:
347
363
  Enabled: false
348
364
  Naming/VariableNumber:
@@ -365,8 +381,6 @@ Performance/FixedSize:
365
381
  Enabled: false
366
382
  Performance/FlatMap:
367
383
  Enabled: false
368
- Performance/HashEachMethods:
369
- Enabled: false
370
384
  Performance/LstripRstrip:
371
385
  Enabled: false
372
386
  Performance/RangeInclude:
@@ -473,6 +487,8 @@ Style/EmptyElse:
473
487
  Enabled: false
474
488
  Style/EmptyLambdaParameter:
475
489
  Enabled: false
490
+ Style/EmptyLineAfterGuardClause:
491
+ Enabled: false
476
492
  Style/EmptyLiteral:
477
493
  Enabled: false
478
494
  Style/EmptyMethod:
@@ -485,6 +501,8 @@ Style/EvalWithLocation:
485
501
  Enabled: false
486
502
  Style/EvenOdd:
487
503
  Enabled: false
504
+ Style/ExpandPathArguments:
505
+ Enabled: false
488
506
  Style/FlipFlop:
489
507
  Enabled: false
490
508
  Style/For:
@@ -669,11 +687,17 @@ Style/SymbolProc:
669
687
  Enabled: false
670
688
  Style/TernaryParentheses:
671
689
  Enabled: false
690
+ Style/TrailingBodyOnClass:
691
+ Enabled: false
672
692
  Style/TrailingBodyOnMethodDefinition:
673
693
  Enabled: false
694
+ Style/TrailingBodyOnModule:
695
+ Enabled: false
674
696
  Style/TrailingCommaInArguments:
675
697
  Enabled: false
676
- Style/TrailingCommaInLiteral:
698
+ Style/TrailingCommaInArrayLiteral:
699
+ Enabled: false
700
+ Style/TrailingCommaInHashLiteral:
677
701
  Enabled: false
678
702
  Style/TrailingMethodEndStatement:
679
703
  Enabled: false
@@ -689,6 +713,8 @@ Style/UnneededInterpolation:
689
713
  Enabled: false
690
714
  Style/UnneededPercentQ:
691
715
  Enabled: false
716
+ Style/UnpackFirst:
717
+ Enabled: false
692
718
  Style/VariableInterpolation:
693
719
  Enabled: false
694
720
  Style/WhenThen:
@@ -705,6 +731,8 @@ Style/ZeroLengthPredicate:
705
731
  Enabled: false
706
732
  Rails/ActionFilter:
707
733
  Enabled: false
734
+ Rails/ActiveRecordAliases:
735
+ Enabled: false
708
736
  Rails/ActiveSupportAliases:
709
737
  Enabled: false
710
738
  Rails/ApplicationJob:
@@ -741,6 +769,8 @@ Rails/HasManyOrHasOneDependent:
741
769
  Enabled: false
742
770
  Rails/HttpPositionalArguments:
743
771
  Enabled: false
772
+ Rails/HttpStatus:
773
+ Enabled: false
744
774
  Rails/InverseOf:
745
775
  Enabled: false
746
776
  Rails/LexicallyScopedActionFilter:
@@ -789,5 +819,7 @@ Security/JSONLoad:
789
819
  Enabled: false
790
820
  Security/MarshalLoad:
791
821
  Enabled: false
822
+ Security/Open:
823
+ Enabled: false
792
824
  Security/YAMLLoad:
793
825
  Enabled: false
@@ -34,6 +34,10 @@ Layout/MultilineAssignmentLayout:
34
34
  StyleGuide: '#indent-conditional-assignment'
35
35
  Enabled: false
36
36
 
37
+ Lint/NumberConversion:
38
+ Description: 'Checks unsafe usage of number conversion methods.'
39
+ Enabled: false
40
+
37
41
  # By default, the rails cops are not run. Override in project or home
38
42
  # directory .rubocop.yml files, or by giving the -R/--rails option.
39
43
  Rails:
@@ -64,6 +68,10 @@ Style/DocumentationMethod:
64
68
  - 'spec/**/*'
65
69
  - 'test/**/*'
66
70
 
71
+ Style/EmptyLineAfterGuardClause:
72
+ Description: 'Add empty line after guard clause.'
73
+ Enabled: false
74
+
67
75
  Style/ImplicitRuntimeError:
68
76
  Description: >-
69
77
  Use `raise` or `fail` with an explicit exception class and
@@ -92,14 +100,6 @@ Style/MissingElse:
92
100
  This will conflict with Style/EmptyElse if
93
101
  Style/EmptyElse is configured to style "both"
94
102
  Enabled: false
95
- EnforcedStyle: both
96
- SupportedStyles:
97
- # if - warn when an if expression is missing an else branch
98
- # case - warn when a case expression is missing an else branch
99
- # both - warn when an if or case expression is missing an else branch
100
- - if
101
- - case
102
- - both
103
103
 
104
104
  Style/OptionHash:
105
105
  Description: "Don't use option hashes when you can use keyword arguments."
@@ -6,6 +6,7 @@ Bundler/DuplicatedGem:
6
6
  Description: 'Checks for duplicate gem entries in Gemfile.'
7
7
  Enabled: true
8
8
  Include:
9
+ - '**/*.gemfile'
9
10
  - '**/Gemfile'
10
11
  - '**/gems.rb'
11
12
 
@@ -16,6 +17,7 @@ Bundler/InsecureProtocolSource:
16
17
  'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
17
18
  Enabled: true
18
19
  Include:
20
+ - '**/*.gemfile'
19
21
  - '**/Gemfile'
20
22
  - '**/gems.rb'
21
23
 
@@ -24,6 +26,7 @@ Bundler/OrderedGems:
24
26
  Gems within groups in the Gemfile should be alphabetically sorted.
25
27
  Enabled: true
26
28
  Include:
29
+ - '**/*.gemfile'
27
30
  - '**/Gemfile'
28
31
  - '**/gems.rb'
29
32
 
@@ -75,6 +78,10 @@ Layout/AlignParameters:
75
78
  StyleGuide: '#no-double-indent'
76
79
  Enabled: true
77
80
 
81
+ Layout/BlockAlignment:
82
+ Description: 'Align block ends correctly.'
83
+ Enabled: true
84
+
78
85
  Layout/BlockEndNewline:
79
86
  Description: 'Put end statement of multiline block on its own line.'
80
87
  Enabled: true
@@ -92,6 +99,17 @@ Layout/CommentIndentation:
92
99
  Description: 'Indentation of comments.'
93
100
  Enabled: true
94
101
 
102
+ Layout/ConditionPosition:
103
+ Description: >-
104
+ Checks for condition placed in a confusing position relative to
105
+ the keyword.
106
+ StyleGuide: '#same-line-condition'
107
+ Enabled: true
108
+
109
+ Layout/DefEndAlignment:
110
+ Description: 'Align ends corresponding to defs correctly.'
111
+ Enabled: true
112
+
95
113
  Layout/DotPosition:
96
114
  Description: 'Checks the position of the dot in multi-line method calls.'
97
115
  StyleGuide: '#consistent-multi-line-chains'
@@ -101,6 +119,10 @@ Layout/ElseAlignment:
101
119
  Description: 'Align elses and elsifs correctly.'
102
120
  Enabled: true
103
121
 
122
+ Layout/EmptyComment:
123
+ Description: 'Checks empty comment.'
124
+ Enabled: true
125
+
104
126
  Layout/EmptyLineAfterMagicComment:
105
127
  Description: 'Add an empty line after magic comments to separate them from code.'
106
128
  StyleGuide: '#separate-magic-comments-from-code'
@@ -155,6 +177,10 @@ Layout/EmptyLinesAroundModuleBody:
155
177
  StyleGuide: '#empty-lines-around-bodies'
156
178
  Enabled: true
157
179
 
180
+ Layout/EndAlignment:
181
+ Description: 'Align ends correctly.'
182
+ Enabled: true
183
+
158
184
  Layout/EndOfLine:
159
185
  Description: 'Use Unix-style line endings.'
160
186
  StyleGuide: '#crlf'
@@ -421,8 +447,8 @@ Lint/AssignmentInCondition:
421
447
  StyleGuide: '#safe-assignment-in-condition'
422
448
  Enabled: true
423
449
 
424
- Lint/BlockAlignment:
425
- Description: 'Align block ends correctly.'
450
+ Lint/BigDecimalNew:
451
+ Description: '`BigDecimal.new()` is deprecated. Use `BigDecimal()` instead.'
426
452
  Enabled: true
427
453
 
428
454
  Lint/BooleanSymbol:
@@ -433,21 +459,10 @@ Lint/CircularArgumentReference:
433
459
  Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
434
460
  Enabled: true
435
461
 
436
- Lint/ConditionPosition:
437
- Description: >-
438
- Checks for condition placed in a confusing position relative to
439
- the keyword.
440
- StyleGuide: '#same-line-condition'
441
- Enabled: true
442
-
443
462
  Lint/Debugger:
444
463
  Description: 'Check for debugger calls.'
445
464
  Enabled: true
446
465
 
447
- Lint/DefEndAlignment:
448
- Description: 'Align ends corresponding to defs correctly.'
449
- Enabled: true
450
-
451
466
  Lint/DeprecatedClassMethods:
452
467
  Description: 'Check for deprecated class method calls.'
453
468
  Enabled: true
@@ -489,10 +504,6 @@ Lint/EmptyWhen:
489
504
  Description: 'Checks for `when` branches with empty bodies.'
490
505
  Enabled: true
491
506
 
492
- Lint/EndAlignment:
493
- Description: 'Align ends correctly.'
494
- Enabled: true
495
-
496
507
  Lint/EndInMethod:
497
508
  Description: 'END blocks should not be placed inside method definitions.'
498
509
  Enabled: true
@@ -579,6 +590,10 @@ Lint/NonLocalExitFromIterator:
579
590
  Description: 'Do not use return in iterator to cause non-local exit.'
580
591
  Enabled: true
581
592
 
593
+ Lint/OrderedMagicComments:
594
+ Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
595
+ Enabled: true
596
+
582
597
  Lint/ParenthesesAsGroupedExpression:
583
598
  Description: >-
584
599
  Checks for method calls with a space before the opening
@@ -676,13 +691,18 @@ Lint/UnifiedInteger:
676
691
  Description: 'Use Integer instead of Fixnum or Bignum'
677
692
  Enabled: true
678
693
 
679
- Lint/UnneededDisable:
694
+ Lint/UnneededCopDisableDirective:
680
695
  Description: >-
681
696
  Checks for rubocop:disable comments that can be removed.
682
697
  Note: this cop is not disabled when disabling all cops.
683
698
  It must be explicitly disabled.
684
699
  Enabled: true
685
700
 
701
+ Lint/UnneededCopEnableDirective:
702
+ Description: Checks for rubocop:enable comments that can be removed.
703
+
704
+ Enabled: true
705
+
686
706
  Lint/UnneededRequireStatement:
687
707
  Description: 'Checks for unnecessary `require` statement.'
688
708
  Enabled: true
@@ -841,6 +861,11 @@ Naming/HeredocDelimiterNaming:
841
861
  StyleGuide: '#heredoc-delimiters'
842
862
  Enabled: true
843
863
 
864
+ Naming/MemoizedInstanceVariableName:
865
+ Description: >-
866
+ Memoized method name should match memo instance variable name.
867
+ Enabled: true
868
+
844
869
  Naming/MethodName:
845
870
  Description: 'Use the configured style when naming methods.'
846
871
  StyleGuide: '#snake-case-symbols-methods-vars'
@@ -851,6 +876,18 @@ Naming/PredicateName:
851
876
  StyleGuide: '#bool-methods-qmark'
852
877
  Enabled: true
853
878
 
879
+ Naming/UncommunicativeBlockParamName:
880
+ Description: >-
881
+ Checks for block parameter names that contain capital letters,
882
+ end in numbers, or do not meet a minimal length.
883
+ Enabled: true
884
+
885
+ Naming/UncommunicativeMethodParamName:
886
+ Description: >-
887
+ Checks for method parameter names that contain capital letters,
888
+ end in numbers, or do not meet a minimal length.
889
+ Enabled: true
890
+
854
891
  Naming/VariableName:
855
892
  Description: 'Use the configured style when naming variables.'
856
893
  StyleGuide: '#snake-case-symbols-methods-vars'
@@ -939,14 +976,6 @@ Performance/FlatMap:
939
976
  # This can be dangerous since `flat_map` will only flatten 1 level, and
940
977
  # `flatten` without any parameters can flatten multiple levels.
941
978
 
942
- Performance/HashEachMethods:
943
- Description: >-
944
- Use `Hash#each_key` and `Hash#each_value` instead of
945
- `Hash#keys.each` and `Hash#values.each`.
946
- StyleGuide: '#hash-each'
947
- Enabled: true
948
- AutoCorrect: false
949
-
950
979
  Performance/LstripRstrip:
951
980
  Description: 'Use `strip` instead of `lstrip.rstrip`.'
952
981
  Enabled: true
@@ -1037,6 +1066,13 @@ Rails/ActionFilter:
1037
1066
  Description: 'Enforces consistent use of action filter methods.'
1038
1067
  Enabled: true
1039
1068
 
1069
+ Rails/ActiveRecordAliases:
1070
+ Description: >-
1071
+ Avoid Active Record aliases:
1072
+ Use `update` instead of `update_attributes`.
1073
+ Use `update!` instead of `update_attributes!`.
1074
+ Enabled: true
1075
+
1040
1076
  Rails/ActiveSupportAliases:
1041
1077
  Description: >-
1042
1078
  Avoid ActiveSupport aliases of standard ruby methods:
@@ -1133,6 +1169,10 @@ Rails/HttpPositionalArguments:
1133
1169
  - 'spec/**/*'
1134
1170
  - 'test/**/*'
1135
1171
 
1172
+ Rails/HttpStatus:
1173
+ Description: 'Enforces use of symbolic or numeric value to define HTTP status.'
1174
+ Enabled: true
1175
+
1136
1176
  Rails/InverseOf:
1137
1177
  Description: 'Checks for associations where the inverse cannot be determined automatically.'
1138
1178
  Enabled: true
@@ -1253,6 +1293,10 @@ Security/MarshalLoad:
1253
1293
  Reference: 'http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations'
1254
1294
  Enabled: true
1255
1295
 
1296
+ Security/Open:
1297
+ Description: 'The use of Kernel#open represents a serious security risk.'
1298
+ Enabled: true
1299
+
1256
1300
  Security/YAMLLoad:
1257
1301
  Description: >-
1258
1302
  Prefer usage of `YAML.safe_load` over `YAML.load` due to potential
@@ -1465,6 +1509,10 @@ Style/EvenOdd:
1465
1509
  StyleGuide: '#predicate-methods'
1466
1510
  Enabled: true
1467
1511
 
1512
+ Style/ExpandPathArguments:
1513
+ Description: "Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`."
1514
+ Enabled: true
1515
+
1468
1516
  Style/FlipFlop:
1469
1517
  Description: 'Checks for flip flops'
1470
1518
  StyleGuide: '#no-flip-flops'
@@ -1900,20 +1948,32 @@ Style/TernaryParentheses:
1900
1948
  Description: 'Checks for use of parentheses around ternary conditions.'
1901
1949
  Enabled: true
1902
1950
 
1951
+ Style/TrailingBodyOnClass:
1952
+ Description: 'Class body goes below class statement.'
1953
+ Enabled: true
1954
+
1903
1955
  Style/TrailingBodyOnMethodDefinition:
1904
1956
  Description: 'Method body goes below definition.'
1905
1957
  Enabled: true
1906
1958
 
1959
+ Style/TrailingBodyOnModule:
1960
+ Description: 'Module body goes below module statement.'
1961
+ Enabled: true
1962
+
1907
1963
  Style/TrailingCommaInArguments:
1908
1964
  Description: 'Checks for trailing comma in argument lists.'
1909
1965
  StyleGuide: '#no-trailing-params-comma'
1910
1966
  Enabled: true
1911
1967
 
1912
- Style/TrailingCommaInLiteral:
1913
- Description: 'Checks for trailing comma in array and hash literals.'
1968
+ Style/TrailingCommaInArrayLiteral:
1969
+ Description: 'Checks for trailing comma in array literals.'
1914
1970
  StyleGuide: '#no-trailing-array-commas'
1915
1971
  Enabled: true
1916
1972
 
1973
+ Style/TrailingCommaInHashLiteral:
1974
+ Description: 'Checks for trailing comma in hash literals.'
1975
+ Enabled: true
1976
+
1917
1977
  Style/TrailingMethodEndStatement:
1918
1978
  Description: 'Checks for trailing end statement on line of method body.'
1919
1979
  Enabled: true
@@ -1950,6 +2010,12 @@ Style/UnneededPercentQ:
1950
2010
  StyleGuide: '#percent-q'
1951
2011
  Enabled: true
1952
2012
 
2013
+ Style/UnpackFirst:
2014
+ Description: >-
2015
+ Checks for accessing the first element of `String#unpack`
2016
+ instead of using `unpack1`
2017
+ Enabled: true
2018
+
1953
2019
  Style/VariableInterpolation:
1954
2020
  Description: >-
1955
2021
  Don't interpolate global, instance and class variables
@@ -9,8 +9,11 @@ inherit_from:
9
9
  AllCops:
10
10
  # Include common Ruby source files.
11
11
  Include:
12
+ - '**/*.arb'
13
+ - '**/*.axlsx'
12
14
  - '**/*.builder'
13
15
  - '**/*.fcgi'
16
+ - '**/*.gemfile'
14
17
  - '**/*.gemspec'
15
18
  - '**/*.god'
16
19
  - '**/*.jb'
@@ -57,6 +60,7 @@ AllCops:
57
60
  Exclude:
58
61
  - 'node_modules/**/*'
59
62
  - 'vendor/**/*'
63
+ - '.git/**/*'
60
64
  # Default formatter will be used if no `-f/--format` option is given.
61
65
  DefaultFormatter: progress
62
66
  # Cop names are displayed in offense messages by default. Change behavior
@@ -111,11 +115,24 @@ AllCops:
111
115
  AllowSymlinksInCacheRootDirectory: false
112
116
  # What MRI version of the Ruby interpreter is the inspected code intended to
113
117
  # run on? (If there is more than one, set this to the lowest version.)
114
- # If a value is specified for TargetRubyVersion then it is used.
115
- # Else if .ruby-version exists and it contains an MRI version it is used.
116
- # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
118
+ # If a value is specified for TargetRubyVersion then it is used. Acceptable
119
+ # values are specificed as a float (i.e. 2.5); the teeny version of Ruby
120
+ # should not be included. If the project specifies a Ruby version in the
121
+ # .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
122
+ # the desired version of Ruby by inspecting the .ruby-version file first,
123
+ # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
124
+ # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
125
+ # from the lock file.) If the Ruby version is still unresolved, RuboCop will
126
+ # use the oldest officially supported Ruby version (currently Ruby 2.1).
117
127
  TargetRubyVersion: ~
118
- TargetRailsVersion: 5.0
128
+ # What version of Rails is the inspected code using? If a value is specified
129
+ # for TargetRailsVersion then it is used. Acceptable values are specificed
130
+ # as a float (i.e. 5.1); the patch version of Rails should not be included.
131
+ # If TargetRailsVersion is not set, RuboCop will parse the Gemfile.lock or
132
+ # gems.locked file to find the version of Rails that has been bound to the
133
+ # application. If neither of those files exist, RuboCop will use Rails 5.0
134
+ # as the default.
135
+ TargetRailsVersion: ~
119
136
 
120
137
  #################### Layout ###########################
121
138
 
@@ -223,6 +240,19 @@ Layout/AlignParameters:
223
240
  # But it can be overridden by setting this parameter
224
241
  IndentationWidth: ~
225
242
 
243
+ # checks whether the end keywords are aligned properly for `do` `end` blocks.
244
+ Layout/BlockAlignment:
245
+ # The value `start_of_block` means that the `end` should be aligned with line
246
+ # where the `do` keyword appears.
247
+ # The value `start_of_line` means it should be aligned with the whole
248
+ # expression's starting line.
249
+ # The value `either` means both are allowed.
250
+ EnforcedStyleAlignWith: either
251
+ SupportedStylesAlignWith:
252
+ - either
253
+ - start_of_block
254
+ - start_of_line
255
+
226
256
  # Indentation of `when`.
227
257
  Layout/CaseIndentation:
228
258
  EnforcedStyle: case
@@ -235,6 +265,18 @@ Layout/CaseIndentation:
235
265
  # This only matters if `IndentOneStep` is `true`
236
266
  IndentationWidth: ~
237
267
 
268
+ Layout/DefEndAlignment:
269
+ # The value `def` means that `end` should be aligned with the def keyword.
270
+ # The value `start_of_line` means that `end` should be aligned with method
271
+ # calls like `private`, `public`, etc, if present in front of the `def`
272
+ # keyword on the same line.
273
+ EnforcedStyleAlignWith: start_of_line
274
+ SupportedStylesAlignWith:
275
+ - start_of_line
276
+ - def
277
+ AutoCorrect: false
278
+ Severity: warning
279
+
238
280
  # Multi-line method chaining should be done with leading dots.
239
281
  Layout/DotPosition:
240
282
  EnforcedStyle: leading
@@ -242,6 +284,10 @@ Layout/DotPosition:
242
284
  - leading
243
285
  - trailing
244
286
 
287
+ Layout/EmptyComment:
288
+ AllowBorderComment: true
289
+ AllowMarginComment: true
290
+
245
291
  # Use empty lines between defs.
246
292
  Layout/EmptyLineBetweenDefs:
247
293
  # If `true`, this parameter means that single line method definitions don't
@@ -263,6 +309,8 @@ Layout/EmptyLinesAroundClassBody:
263
309
  - empty_lines_except_namespace
264
310
  - empty_lines_special
265
311
  - no_empty_lines
312
+ - beginning_only
313
+ - ending_only
266
314
 
267
315
  Layout/EmptyLinesAroundModuleBody:
268
316
  EnforcedStyle: no_empty_lines
@@ -272,6 +320,23 @@ Layout/EmptyLinesAroundModuleBody:
272
320
  - empty_lines_special
273
321
  - no_empty_lines
274
322
 
323
+ # Align ends correctly.
324
+ Layout/EndAlignment:
325
+ # The value `keyword` means that `end` should be aligned with the matching
326
+ # keyword (`if`, `while`, etc.).
327
+ # The value `variable` means that in assignments, `end` should be aligned
328
+ # with the start of the variable on the left hand side of `=`. In all other
329
+ # situations, `end` should still be aligned with the keyword.
330
+ # The value `start_of_line` means that `end` should be aligned with the start
331
+ # of the line which the matching keyword appears on.
332
+ EnforcedStyleAlignWith: keyword
333
+ SupportedStylesAlignWith:
334
+ - keyword
335
+ - variable
336
+ - start_of_line
337
+ AutoCorrect: false
338
+ Severity: warning
339
+
275
340
  Layout/EndOfLine:
276
341
  # The `native` style means that CR+LF (Carriage Return + Line Feed) is
277
342
  # enforced on Windows, and LF is enforced on other platforms. The other styles
@@ -544,6 +609,10 @@ Layout/SpaceInsideReferenceBrackets:
544
609
  SupportedStyles:
545
610
  - space
546
611
  - no_space
612
+ EnforcedStyleForEmptyBrackets: no_space
613
+ SupportedStylesForEmptyBrackets:
614
+ - space
615
+ - no_space
547
616
 
548
617
  Layout/SpaceInsideStringInterpolation:
549
618
  EnforcedStyle: no_space
@@ -682,6 +751,27 @@ Naming/PredicateName:
682
751
  Exclude:
683
752
  - 'spec/**/*'
684
753
 
754
+ Naming/UncommunicativeBlockParamName:
755
+ # Parameter names may be equal to or greater than this value
756
+ MinNameLength: 1
757
+ AllowNamesEndingInNumbers: true
758
+ # Whitelisted names that will not register an offense
759
+ AllowedNames: []
760
+ # Blacklisted names that will register an offense
761
+ ForbiddenNames: []
762
+
763
+ Naming/UncommunicativeMethodParamName:
764
+ # Parameter names may be equal to or greater than this value
765
+ MinNameLength: 3
766
+ AllowNamesEndingInNumbers: true
767
+ # Whitelisted names that will not register an offense
768
+ AllowedNames:
769
+ - io
770
+ - id
771
+ - to
772
+ # Blacklisted names that will register an offense
773
+ ForbiddenNames: []
774
+
685
775
  Naming/VariableName:
686
776
  EnforcedStyle: snake_case
687
777
  SupportedStyles:
@@ -931,8 +1021,8 @@ Style/EmptyMethod:
931
1021
  Style/For:
932
1022
  EnforcedStyle: each
933
1023
  SupportedStyles:
934
- - for
935
1024
  - each
1025
+ - for
936
1026
 
937
1027
  # Enforce the method used for string formatting.
938
1028
  Style/FormatString:
@@ -1038,6 +1128,16 @@ Style/MethodDefParentheses:
1038
1128
  - require_no_parentheses
1039
1129
  - require_no_parentheses_except_multiline
1040
1130
 
1131
+ Style/MissingElse:
1132
+ EnforcedStyle: both
1133
+ SupportedStyles:
1134
+ # if - warn when an if expression is missing an else branch
1135
+ # case - warn when a case expression is missing an else branch
1136
+ # both - warn when an if or case expression is missing an else branch
1137
+ - if
1138
+ - case
1139
+ - both
1140
+
1041
1141
  # Checks the grouping of mixins (`include`, `extend`, `prepend`) in `class` and
1042
1142
  # `module` bodies.
1043
1143
  Style/MixinGrouping:
@@ -1210,6 +1310,11 @@ Style/SafeNavigation:
1210
1310
  # Safe navigation may cause a statement to start returning `nil` in addition
1211
1311
  # to whatever it used to return.
1212
1312
  ConvertCodeThatCanStartToReturnNil: false
1313
+ Whitelist:
1314
+ - present?
1315
+ - blank?
1316
+ - presence
1317
+ - try
1213
1318
 
1214
1319
  Style/Semicolon:
1215
1320
  # Allow `;` to separate several expressions on the same line.
@@ -1304,11 +1409,22 @@ Style/TrailingCommaInArguments:
1304
1409
  - consistent_comma
1305
1410
  - no_comma
1306
1411
 
1307
- Style/TrailingCommaInLiteral:
1308
- # If `comma`, the cop requires a comma after the last item in an array or
1309
- # hash, but only when each item is on its own line.
1412
+ Style/TrailingCommaInArrayLiteral:
1413
+ # If `comma`, the cop requires a comma after the last item in an array,
1414
+ # but only when each item is on its own line.
1310
1415
  # If `consistent_comma`, the cop requires a comma after the last item of all
1311
- # non-empty array and hash literals.
1416
+ # non-empty array literals.
1417
+ EnforcedStyleForMultiline: no_comma
1418
+ SupportedStylesForMultiline:
1419
+ - comma
1420
+ - consistent_comma
1421
+ - no_comma
1422
+
1423
+ Style/TrailingCommaInHashLiteral:
1424
+ # If `comma`, the cop requires a comma after the last item in a hash,
1425
+ # but only when each item is on its own line.
1426
+ # If `consistent_comma`, the cop requires a comma after the last item of all
1427
+ # non-empty hash literals.
1312
1428
  EnforcedStyleForMultiline: no_comma
1313
1429
  SupportedStylesForMultiline:
1314
1430
  - comma
@@ -1442,46 +1558,6 @@ Metrics/PerceivedComplexity:
1442
1558
  Lint/AssignmentInCondition:
1443
1559
  AllowSafeAssignment: true
1444
1560
 
1445
- # checks whether the end keywords are aligned properly for `do` `end` blocks.
1446
- Lint/BlockAlignment:
1447
- # The value `start_of_block` means that the `end` should be aligned with line
1448
- # where the `do` keyword appears.
1449
- # The value `start_of_line` means it should be aligned with the whole
1450
- # expression's starting line.
1451
- # The value `either` means both are allowed.
1452
- EnforcedStyleAlignWith: either
1453
- SupportedStylesAlignWith:
1454
- - either
1455
- - start_of_block
1456
- - start_of_line
1457
-
1458
- Lint/DefEndAlignment:
1459
- # The value `def` means that `end` should be aligned with the def keyword.
1460
- # The value `start_of_line` means that `end` should be aligned with method
1461
- # calls like `private`, `public`, etc, if present in front of the `def`
1462
- # keyword on the same line.
1463
- EnforcedStyleAlignWith: start_of_line
1464
- SupportedStylesAlignWith:
1465
- - start_of_line
1466
- - def
1467
- AutoCorrect: false
1468
-
1469
- # Align ends correctly.
1470
- Lint/EndAlignment:
1471
- # The value `keyword` means that `end` should be aligned with the matching
1472
- # keyword (`if`, `while`, etc.).
1473
- # The value `variable` means that in assignments, `end` should be aligned
1474
- # with the start of the variable on the left hand side of `=`. In all other
1475
- # situations, `end` should still be aligned with the keyword.
1476
- # The value `start_of_line` means that `end` should be aligned with the start
1477
- # of the line which the matching keyword appears on.
1478
- EnforcedStyleAlignWith: keyword
1479
- SupportedStylesAlignWith:
1480
- - keyword
1481
- - variable
1482
- - start_of_line
1483
- AutoCorrect: false
1484
-
1485
1561
  Lint/InheritException:
1486
1562
  # The default base class in favour of `Exception`.
1487
1563
  EnforcedStyle: runtime_error
@@ -1520,6 +1596,9 @@ Lint/UnusedMethodArgument:
1520
1596
  AllowUnusedKeywordArguments: false
1521
1597
  IgnoreEmptyMethods: true
1522
1598
 
1599
+ Lint/Void:
1600
+ CheckForMethodsWithNoSideEffects: false
1601
+
1523
1602
  #################### Performance ###########################
1524
1603
 
1525
1604
  Performance/DoubleStartEndWith:
@@ -1594,6 +1673,12 @@ Rails/HasManyOrHasOneDependent:
1594
1673
  Include:
1595
1674
  - app/models/**/*.rb
1596
1675
 
1676
+ Rails/HttpStatus:
1677
+ EnforcedStyle: symbolic
1678
+ SupportedStyles:
1679
+ - numeric
1680
+ - symbolic
1681
+
1597
1682
  Rails/InverseOf:
1598
1683
  Include:
1599
1684
  - app/models/**/*.rb
@@ -1,4 +1,4 @@
1
1
  module Chefstyle
2
- VERSION = "0.8.0".freeze
3
- RUBOCOP_VERSION = "0.52.1".freeze
2
+ VERSION = "0.9.0".freeze
3
+ RUBOCOP_VERSION = "0.54.0".freeze
4
4
  end
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.8.0
4
+ version: 0.9.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-03-02 00:00:00.000000000 Z
11
+ date: 2018-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.52.1
61
+ version: 0.54.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.52.1
68
+ version: 0.54.0
69
69
  description:
70
70
  email:
71
71
  - thom@chef.io