cookstyle 3.0.2 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c62fc4bd1636fca2fb4d4b6c50bf9674e17585c42e746833b9516109baa4eabd
4
- data.tar.gz: 9992507f6f7899f01caf214ce6e8b2bf6a7b05ba9a91a24ccbabb72268951275
3
+ metadata.gz: 81d2f149595e089024c831b1718b064eea9fde55e06f232379d8a25d8b621dc1
4
+ data.tar.gz: 623b3a00164fc4fa19d90633dbb1b0327985c9c61a1b2768fe17deff77b9996d
5
5
  SHA512:
6
- metadata.gz: 4a9d8b8c033ce5367a818041da194bc7ba2e6dccd402243ca4e86260812ba2c2752313498568277ba3d6f2991c34dba9e5d2337c2f17dbe33965d457c0c90c7d
7
- data.tar.gz: 2ce3d2e58f08e0e00ac546b70e4d21126ce3691ffc4e8551b2751b800171f9671e2493696985cfd27e38df8f40e4195e3ccea52265ddadb6874f0fa7ec67f06c
6
+ metadata.gz: 6ab3d6a69360effc8f8becea1ffb11fa6fd0a9cbf3259a3221501258a1166d881092eaf557a002a461e7962c8344935799cb6f06e41281ffdb48ceb88b61a9a0
7
+ data.tar.gz: bdcc8700555d467231d3226148071cdb73a5de2a5247b7810b7f597116909aa01f170dfcb6b314e2b033b5d50301355df8acfcac0467f5e44fc99930ab645948
data/Gemfile CHANGED
@@ -2,3 +2,21 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in cookstyle.gemspec
4
4
  gemspec
5
+
6
+ group :debug do
7
+ gem 'pry'
8
+ gem 'pry-byebug'
9
+ gem 'pry-stack_explorer'
10
+ end
11
+
12
+ group :docs do
13
+ gem 'github-markup'
14
+ gem 'redcarpet'
15
+ gem 'yard'
16
+ end
17
+
18
+ instance_eval(ENV['GEMFILE_MOD']) if ENV['GEMFILE_MOD']
19
+
20
+ # If you want to load debugging tools into the bundle exec sandbox,
21
+ # add these additional dependencies into Gemfile.local
22
+ eval_gemfile(__FILE__ + '.local') if File.exist?(__FILE__ + '.local')
data/config/cookstyle.yml CHANGED
@@ -4,13 +4,459 @@ AllCops:
4
4
  - vendor/**/*
5
5
  - Guardfile
6
6
 
7
- AlignParameters:
8
- Enabled: false
9
- Documentation:
10
- Enabled: false
11
- Encoding:
7
+ #### The base rubocop 0.37 enabled.yml file we started with ####
8
+
9
+ Layout/AccessModifierIndentation:
10
+ Enabled: true
11
+ Naming/AccessorMethodName:
12
+ Enabled: true
13
+ Layout/AlignArray:
14
+ Enabled: true
15
+ Layout/AlignHash:
16
+ Enabled: true
17
+ Style/AndOr:
18
+ Enabled: true
19
+ Style/ArrayJoin:
20
+ Enabled: true
21
+ Naming/AsciiIdentifiers:
22
+ Enabled: true
23
+ Style/Attr:
24
+ Enabled: true
25
+ Style/BeginBlock:
26
+ Enabled: true
27
+ Style/BarePercentLiterals:
28
+ Enabled: true
29
+ Style/BlockComments:
30
+ Enabled: true
31
+ Layout/BlockEndNewline:
32
+ Enabled: true
33
+ Style/BlockDelimiters:
34
+ Enabled: true
35
+ Style/BracesAroundHashParameters:
36
+ Enabled: true
37
+ Style/CaseEquality:
38
+ Enabled: true
39
+ Layout/CaseIndentation:
40
+ Enabled: true
41
+ Style/CharacterLiteral:
42
+ Enabled: true
43
+ Naming/ClassAndModuleCamelCase:
44
+ Enabled: true
45
+ Style/ClassCheck:
46
+ Enabled: true
47
+ Style/ClassMethods:
48
+ Enabled: true
49
+ Style/ClassVars:
50
+ Enabled: true
51
+ Layout/ClosingParenthesisIndentation:
52
+ Enabled: true
53
+ Style/ColonMethodCall:
54
+ Enabled: true
55
+ Style/CommandLiteral:
56
+ Enabled: true
57
+ Style/CommentAnnotation:
58
+ Enabled: true
59
+ Layout/CommentIndentation:
60
+ Enabled: true
61
+ Style/ConditionalAssignment:
62
+ Enabled: true
63
+ Naming/ConstantName:
64
+ Enabled: true
65
+ Style/DefWithParentheses:
66
+ Enabled: true
67
+ Style/DeprecatedHashMethods:
68
+ Enabled: true
69
+ Layout/DotPosition:
70
+ Enabled: true
71
+ Style/EachWithObject:
72
+ Enabled: true
73
+ Layout/ElseAlignment:
74
+ Enabled: true
75
+ Style/EmptyElse:
76
+ Enabled: true
77
+ Layout/EmptyLineBetweenDefs:
78
+ Enabled: true
79
+ Layout/EmptyLines:
80
+ Enabled: true
81
+ Layout/EmptyLinesAroundAccessModifier:
82
+ Enabled: true
83
+ Layout/EmptyLinesAroundBlockBody:
84
+ Enabled: true
85
+ Layout/EmptyLinesAroundClassBody:
86
+ Enabled: true
87
+ Layout/EmptyLinesAroundModuleBody:
88
+ Enabled: true
89
+ Layout/EmptyLinesAroundMethodBody:
90
+ Enabled: true
91
+ Style/EmptyLiteral:
92
+ Enabled: true
93
+ Style/EndBlock:
94
+ Enabled: true
95
+ Style/EvenOdd:
96
+ Enabled: true
97
+ Layout/ExtraSpacing:
98
+ Enabled: true
99
+ Style/FrozenStringLiteralComment:
100
+ Enabled: true
101
+ Layout/InitialIndentation:
102
+ Enabled: true
103
+ Layout/FirstParameterIndentation:
104
+ Enabled: true
105
+ Style/FlipFlop:
106
+ Enabled: true
107
+ Style/For:
108
+ Enabled: true
109
+ Style/FormatString:
110
+ Enabled: true
111
+ Style/GlobalVars:
112
+ Enabled: true
113
+ Style/GuardClause:
114
+ Enabled: true
115
+ Style/HashSyntax:
116
+ Enabled: true
117
+ Style/IfInsideElse:
118
+ Enabled: true
119
+ Style/IfWithSemicolon:
120
+ Enabled: true
121
+ Layout/IndentationConsistency:
122
+ Enabled: true
123
+ Layout/IndentationWidth:
124
+ Enabled: true
125
+ Style/IdenticalConditionalBranches:
126
+ Enabled: true
127
+ Layout/IndentArray:
128
+ Enabled: true
129
+ Layout/IndentAssignment:
130
+ Enabled: true
131
+ Layout/IndentHash:
132
+ Enabled: true
133
+ Style/InfiniteLoop:
134
+ Enabled: true
135
+ Style/Lambda:
136
+ Enabled: true
137
+ Style/LambdaCall:
138
+ Enabled: true
139
+ Layout/LeadingCommentSpace:
140
+ Enabled: true
141
+ Style/LineEndConcatenation:
142
+ Enabled: true
143
+ Style/MethodCallParentheses:
144
+ Enabled: true
145
+ Style/MethodDefParentheses:
146
+ Enabled: true
147
+ Naming/MethodName:
148
+ Enabled: true
149
+ Style/ModuleFunction:
150
+ Enabled: true
151
+ Style/MultilineBlockChain:
152
+ Enabled: true
153
+ Layout/MultilineBlockLayout:
154
+ Enabled: true
155
+ Style/MultilineIfThen:
156
+ Enabled: true
157
+ Layout/MultilineMethodCallIndentation:
158
+ Enabled: true
159
+ Layout/MultilineOperationIndentation:
160
+ Enabled: true
161
+ Style/MultilineTernaryOperator:
162
+ Enabled: true
163
+ Style/MutableConstant:
164
+ Enabled: true
165
+ Style/NegatedIf:
166
+ Enabled: true
167
+ Style/NegatedWhile:
168
+ Enabled: true
169
+ Style/NestedModifier:
170
+ Enabled: true
171
+ Style/NestedParenthesizedCalls:
172
+ Enabled: true
173
+ Style/NestedTernaryOperator:
174
+ Enabled: true
175
+ Style/Next:
176
+ Enabled: true
177
+ Style/NilComparison:
178
+ Enabled: true
179
+ Style/NonNilCheck:
180
+ Enabled: true
181
+ Style/Not:
182
+ Enabled: true
183
+ Style/OneLineConditional:
184
+ Enabled: true
185
+ Naming/OpMethod:
186
+ Enabled: true
187
+ Style/OptionalArguments:
188
+ Enabled: true
189
+ Style/ParallelAssignment:
190
+ Enabled: true
191
+ Style/ParenthesesAroundCondition:
192
+ Enabled: true
193
+ Style/PercentLiteralDelimiters:
194
+ Enabled: true
195
+ Style/PercentQLiterals:
196
+ Enabled: true
197
+ Style/PerlBackrefs:
198
+ Enabled: true
199
+ Naming/PredicateName:
200
+ Enabled: true
201
+ Style/Proc:
202
+ Enabled: true
203
+ Style/RaiseArgs:
204
+ Enabled: true
205
+ Style/RedundantBegin:
206
+ Enabled: true
207
+ Style/RedundantException:
208
+ Enabled: true
209
+ Style/RedundantFreeze:
210
+ Enabled: true
211
+ Style/RedundantParentheses:
212
+ Enabled: true
213
+ Style/RedundantReturn:
214
+ Enabled: true
215
+ Style/RedundantSelf:
216
+ Enabled: true
217
+ Style/RegexpLiteral:
218
+ Enabled: true
219
+ Layout/RescueEnsureAlignment:
220
+ Enabled: true
221
+ Style/RescueModifier:
222
+ Enabled: true
223
+ Style/SelfAssignment:
224
+ Enabled: true
225
+ Style/Semicolon:
226
+ Enabled: true
227
+ Style/SignalException:
228
+ Enabled: true
229
+ Style/SingleLineBlockParams:
230
+ Enabled: true
231
+ Style/SingleLineMethods:
232
+ Enabled: true
233
+ Layout/SpaceAfterColon:
234
+ Enabled: true
235
+ Layout/SpaceAfterComma:
236
+ Enabled: true
237
+ Layout/SpaceAfterMethodName:
238
+ Enabled: true
239
+ Layout/SpaceAfterNot:
240
+ Enabled: true
241
+ Layout/SpaceAfterSemicolon:
242
+ Enabled: true
243
+ Layout/SpaceBeforeBlockBraces:
244
+ Enabled: true
245
+ Layout/SpaceBeforeComma:
246
+ Enabled: true
247
+ Layout/SpaceBeforeComment:
248
+ Enabled: true
249
+ Layout/SpaceBeforeSemicolon:
250
+ Enabled: true
251
+ Layout/SpaceInsideBlockBraces:
252
+ Enabled: true
253
+ Layout/SpaceAroundBlockParameters:
254
+ Enabled: true
255
+ Layout/SpaceAroundEqualsInParameterDefault:
256
+ Enabled: true
257
+ Layout/SpaceAroundKeyword:
258
+ Enabled: true
259
+ Layout/SpaceAroundOperators:
260
+ Enabled: true
261
+ Layout/SpaceInsideHashLiteralBraces:
262
+ Enabled: true
263
+ Layout/SpaceInsideParens:
264
+ Enabled: true
265
+ Layout/SpaceInsideRangeLiteral:
266
+ Enabled: true
267
+ Layout/SpaceInsideStringInterpolation:
268
+ Enabled: true
269
+ Style/SpecialGlobalVars:
270
+ Enabled: true
271
+ Style/StabbyLambdaParentheses:
272
+ Enabled: true
273
+ Style/StringLiterals:
274
+ Enabled: true
275
+ Style/StringLiteralsInInterpolation:
276
+ Enabled: true
277
+ Style/StructInheritance:
278
+ Enabled: true
279
+ Style/SymbolLiteral:
280
+ Enabled: true
281
+ Style/SymbolProc:
282
+ Enabled: true
283
+ Layout/Tab:
284
+ Enabled: true
285
+ Layout/TrailingBlankLines:
286
+ Enabled: true
287
+ Style/TrailingCommaInArguments:
288
+ Enabled: true
289
+ Layout/TrailingWhitespace:
290
+ Enabled: true
291
+ Style/TrivialAccessors:
292
+ Enabled: true
293
+ Style/UnlessElse:
294
+ Enabled: true
295
+ Style/UnneededCapitalW:
296
+ Enabled: true
297
+ Style/UnneededInterpolation:
298
+ Enabled: true
299
+ Style/UnneededPercentQ:
300
+ Enabled: true
301
+ Style/TrailingUnderscoreVariable:
302
+ Enabled: true
303
+ Style/VariableInterpolation:
304
+ Enabled: true
305
+ Naming/VariableName:
306
+ Enabled: true
307
+ Style/WhenThen:
308
+ Enabled: true
309
+ Style/WhileUntilDo:
310
+ Enabled: true
311
+ Style/WhileUntilModifier:
312
+ Enabled: true
313
+ Style/WordArray:
314
+ Enabled: true
315
+ Style/ZeroLengthPredicate:
316
+ Enabled: true
317
+ Metrics/BlockNesting:
318
+ Enabled: true
319
+ Metrics/ParameterLists:
320
+ Enabled: true
321
+ Lint/AmbiguousOperator:
322
+ Enabled: true
323
+ Lint/AssignmentInCondition:
324
+ Enabled: true
325
+ Layout/BlockAlignment:
326
+ Enabled: true
327
+ Lint/CircularArgumentReference:
328
+ Enabled: true
329
+ Layout/ConditionPosition:
330
+ Enabled: true
331
+ Lint/Debugger:
332
+ Enabled: true
333
+ Layout/DefEndAlignment:
334
+ Enabled: true
335
+ Lint/DeprecatedClassMethods:
336
+ Enabled: true
337
+ Lint/DuplicateMethods:
338
+ Enabled: true
339
+ Lint/DuplicatedKey:
340
+ Enabled: true
341
+ Lint/EachWithObjectArgument:
342
+ Enabled: true
343
+ Lint/ElseLayout:
344
+ Enabled: true
345
+ Lint/EmptyEnsure:
346
+ Enabled: true
347
+ Lint/EmptyInterpolation:
348
+ Enabled: true
349
+ Layout/EndAlignment:
350
+ Enabled: true
351
+ Lint/EndInMethod:
352
+ Enabled: true
353
+ Lint/EnsureReturn:
354
+ Enabled: true
355
+ Security/Eval:
356
+ Enabled: true
357
+ Lint/FloatOutOfRange:
358
+ Enabled: true
359
+ Lint/FormatParameterMismatch:
360
+ Enabled: true
361
+ Lint/HandleExceptions:
362
+ Enabled: true
363
+ Lint/ImplicitStringConcatenation:
364
+ Enabled: true
365
+ Lint/IneffectiveAccessModifier:
366
+ Enabled: true
367
+ Lint/LiteralAsCondition:
368
+ Enabled: true
369
+ Lint/LiteralInInterpolation:
370
+ Enabled: true
371
+ Lint/Loop:
372
+ Enabled: true
373
+ Lint/NestedMethodDefinition:
374
+ Enabled: true
375
+ Lint/NextWithoutAccumulator:
376
+ Enabled: true
377
+ Lint/NonLocalExitFromIterator:
378
+ Enabled: true
379
+ Lint/ParenthesesAsGroupedExpression:
380
+ Enabled: true
381
+ Lint/RandOne:
382
+ Enabled: true
383
+ Lint/RequireParentheses:
384
+ Enabled: true
385
+ Lint/RescueException:
386
+ Enabled: true
387
+ Lint/ShadowingOuterLocalVariable:
388
+ Enabled: true
389
+ Lint/StringConversionInInterpolation:
390
+ Enabled: true
391
+ Lint/UnderscorePrefixedVariableName:
392
+ Enabled: true
393
+ Lint/UnneededCopDisableDirective:
394
+ Enabled: true
395
+ Lint/UnusedBlockArgument:
396
+ Enabled: true
397
+ Lint/UnusedMethodArgument:
398
+ Enabled: true
399
+ Lint/UnreachableCode:
400
+ Enabled: true
401
+ Lint/UselessAccessModifier:
402
+ Enabled: true
403
+ Lint/UselessAssignment:
404
+ Enabled: true
405
+ Lint/UselessComparison:
406
+ Enabled: true
407
+ Lint/UselessElseWithoutRescue:
408
+ Enabled: true
409
+ Lint/UselessSetterCall:
410
+ Enabled: true
411
+ Lint/Void:
412
+ Enabled: true
413
+ Performance/Casecmp:
414
+ Enabled: true
415
+ Performance/CaseWhenSplat:
416
+ Enabled: true
417
+ Performance/Count:
418
+ Enabled: true
419
+ Performance/Detect:
420
+ Enabled: true
421
+ Performance/DoubleStartEndWith:
422
+ Enabled: true
423
+ Performance/EndWith:
424
+ Enabled: true
425
+ Performance/FixedSize:
426
+ Enabled: true
427
+ Performance/FlatMap:
428
+ Enabled: true
429
+ EnabledForFlattenWithoutParams: false
430
+ Performance/LstripRstrip:
431
+ Enabled: true
432
+ Performance/RangeInclude:
433
+ Enabled: true
434
+ Performance/RedundantBlockCall:
435
+ Enabled: true
436
+ Performance/RedundantMatch:
437
+ Enabled: true
438
+ Performance/RedundantMerge:
439
+ Enabled: true
440
+ Performance/RedundantSortBy:
441
+ Enabled: true
442
+ Performance/ReverseEach:
443
+ Enabled: true
444
+ Performance/Sample:
445
+ Enabled: true
446
+ Performance/Size:
447
+ Enabled: true
448
+ Performance/StartWith:
449
+ Enabled: true
450
+ Performance/StringReplacement:
451
+ Enabled: true
452
+ Performance/TimesMap:
453
+ Enabled: true
454
+
455
+ ##### Additional rules we enable/disable over the rubocop 0.37 rules ago #####
456
+
457
+ Layout/AlignParameters:
12
458
  Enabled: false
13
- Naming/FileName:
459
+ Style/Encoding:
14
460
  Enabled: false
15
461
  Style/Alias:
16
462
  Enabled: false
@@ -21,12 +467,16 @@ Style/ClassAndModuleChildren:
21
467
  Style/DoubleNegation:
22
468
  Enabled: false
23
469
 
470
+ # file names don't matter in cookbooks
471
+ Naming/FileName:
472
+ Enabled: false
473
+
24
474
  # disable all the length cops as they're not appropriate for cookbooks
25
- LineLength:
475
+ Metrics/LineLength:
26
476
  Enabled: false
27
- MethodLength:
477
+ Metrics/MethodLength:
28
478
  Enabled: false
29
- BlockLength:
479
+ Metrics/BlockLength:
30
480
  Enabled: false
31
481
  Metrics/AbcSize:
32
482
  Enabled: false
@@ -36,7 +486,7 @@ Metrics/ClassLength:
36
486
  Enabled: false
37
487
  Metrics/CyclomaticComplexity:
38
488
  Enabled: false
39
- PerceivedComplexity:
489
+ Metrics/PerceivedComplexity:
40
490
  Enabled: false
41
491
 
42
492
  # https://github.com/chef/cookstyle/pull/5
@@ -110,10 +560,6 @@ Style/NumericPredicate:
110
560
  Layout/SpaceInsideArrayPercentLiteral:
111
561
  Enabled: true
112
562
 
113
- # disable this until there's an autocorrect (0.47 has one)
114
- Bundler/OrderedGems:
115
- Enabled: false
116
-
117
563
  # There's no reason to have a gem listed twice
118
564
  Bundler/DuplicatedGem:
119
565
  Enabled: true
@@ -236,3 +682,15 @@ Style/SymbolProc:
236
682
  # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
237
683
  IgnoredMethods:
238
684
  - lazy
685
+
686
+ # as much as I wish everyone would document things it's just not going to happen
687
+ Style/Documentation:
688
+ Enabled: false
689
+
690
+ # compact code is nice, but this is actually harder to read for new users
691
+ Style/IfUnlessModifier:
692
+ Enabled: false
693
+
694
+ # in general cookbooks shouldn't include a gemfile, but if they do they can do with it as they wish
695
+ Bundler/OrderedGems:
696
+ Enabled: false