lcgstyle 0.0.7 → 0.0.8

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
  SHA1:
3
- metadata.gz: cc02e8d9bc1bfc0c9ae1016e9b35ad4f7c9d36b8
4
- data.tar.gz: 2097d7d115f520481145fbbe8082e5b0636059b9
3
+ metadata.gz: 0f433e407d8e15ab734fec19d0bb2fb70ddbe320
4
+ data.tar.gz: d9e4ed098c918cb53c3122dea4c600e794dde452
5
5
  SHA512:
6
- metadata.gz: acb07cb3e984f30d999ccbb9bc7a2df94a72ef28a7ac645ac0a58cf26ac43c2bfbea3333a9b375dca70e2d3281e2ddc20df2086a0314363a38b56ee160a39d02
7
- data.tar.gz: c6f1703ad11ba725f8213101c2c32d8494ead64c7e63b75336122a74ced529b61c34c7ac6532c413d32efe414ec1d88d9da427b2bd8f4193a725072c5620db6d
6
+ metadata.gz: 1c1d71af9a43253eaa1c06f785a1223ff442b83c59b92b5e58d345abb6bbf311ef7d3d1b4cf9c520410057d714f323581535d2927ee915c90bc115505fff3bf2
7
+ data.tar.gz: 466ed8e4eae19517174b0e2fe9c8334720661b9cd158f7e6b879587346de0884a9fe2f38d013479a557b5093f09dc0f19a48b09c18ef1c6266a53bcb2c97597d
@@ -99,7 +99,7 @@ Lint/RescueException:
99
99
  Enabled: false
100
100
 
101
101
  # we have lots of not-insecure uses of eval
102
- Lint/Eval:
102
+ Security/Eval:
103
103
  Enabled: false
104
104
 
105
105
  # disabling this will make it easier to stage chefstyle rollouts
@@ -522,3 +522,10 @@ Style/EmptyCaseCondition:
522
522
  Style/MultilineArrayBraceLayout:
523
523
  Enabled: false
524
524
 
525
+ # This rule isn't smart enough to figure out accessors vs. things that set stuff on the system (e.g. set_member method in group providers)
526
+ Style/AccessorMethodName:
527
+ Enabled: false
528
+
529
+ # Perl backrefs are just fine and the alternative is a lot of typing.
530
+ Style/PerlBackrefs:
531
+ Enabled: false
@@ -1,4 +1,8 @@
1
1
  ---
2
+ Bundler/DuplicatedGem:
3
+ Enabled: false
4
+ Bundler/OrderedGems:
5
+ Enabled: false
2
6
  Lint/AmbiguousOperator:
3
7
  Enabled: false
4
8
  Lint/AmbiguousRegexpLiteral:
@@ -41,8 +45,6 @@ Lint/EndInMethod:
41
45
  Enabled: false
42
46
  Lint/EnsureReturn:
43
47
  Enabled: false
44
- Lint/Eval:
45
- Enabled: false
46
48
  Lint/FloatOutOfRange:
47
49
  Enabled: false
48
50
  Lint/FormatParameterMismatch:
@@ -63,6 +65,8 @@ Lint/LiteralInInterpolation:
63
65
  Enabled: false
64
66
  Lint/Loop:
65
67
  Enabled: false
68
+ Lint/MultipleCompare:
69
+ Enabled: false
66
70
  Lint/NestedMethodDefinition:
67
71
  Enabled: false
68
72
  Lint/NextWithoutAccumulator:
@@ -81,6 +85,8 @@ Lint/RequireParentheses:
81
85
  Enabled: false
82
86
  Lint/RescueException:
83
87
  Enabled: false
88
+ Lint/SafeNavigationChain:
89
+ Enabled: false
84
90
  Lint/ShadowedException:
85
91
  Enabled: false
86
92
  Lint/ShadowingOuterLocalVariable:
@@ -163,13 +169,15 @@ Performance/RedundantMerge:
163
169
  Enabled: false
164
170
  Performance/RedundantSortBy:
165
171
  Enabled: false
172
+ Performance/RegexpMatch:
173
+ Enabled: false
166
174
  Performance/ReverseEach:
167
175
  Enabled: false
168
176
  Performance/Sample:
169
177
  Enabled: false
170
178
  Performance/Size:
171
179
  Enabled: false
172
- Performance/SortWithBlock:
180
+ Performance/CompareWithBlock:
173
181
  Enabled: false
174
182
  Performance/StartWith:
175
183
  Enabled: false
@@ -285,6 +293,8 @@ Style/EmptyLinesAroundModuleBody:
285
293
  Enabled: false
286
294
  Style/EmptyLiteral:
287
295
  Enabled: false
296
+ Style/EmptyMethod:
297
+ Enabled: false
288
298
  Style/Encoding:
289
299
  Enabled: false
290
300
  Style/EndBlock:
@@ -357,7 +367,9 @@ Style/LeadingCommentSpace:
357
367
  Enabled: false
358
368
  Style/LineEndConcatenation:
359
369
  Enabled: false
360
- Style/MethodCallParentheses:
370
+ Style/MethodCallWithoutArgsParentheses:
371
+ Enabled: false
372
+ Style/MethodCallWithArgsParentheses:
361
373
  Enabled: false
362
374
  Style/MethodCalledOnDoEndBlock:
363
375
  Enabled: false
@@ -593,8 +605,12 @@ Rails/Delegate:
593
605
  Enabled: false
594
606
  Rails/DelegateAllowBlank:
595
607
  Enabled: false
608
+ Rails/EnumUniqueness:
609
+ Enabled: false
596
610
  Rails/Exit:
597
611
  Enabled: false
612
+ Rails/FilePath:
613
+ Enabled: false
598
614
  Rails/FindBy:
599
615
  Enabled: false
600
616
  Rails/FindEach:
@@ -615,17 +631,27 @@ Rails/ReadWriteAttribute:
615
631
  Enabled: false
616
632
  Rails/RequestReferer:
617
633
  Enabled: false
634
+ Rails/ReversibleMigration:
635
+ Enabled: false
618
636
  Rails/SafeNavigation:
619
637
  Enabled: false
620
638
  Rails/SaveBang:
621
639
  Enabled: false
622
640
  Rails/ScopeArgs:
623
641
  Enabled: false
642
+ Rails/SkipsModelValidations:
643
+ Enabled: false
624
644
  Rails/TimeZone:
625
645
  Enabled: false
626
646
  Rails/UniqBeforePluck:
627
647
  Enabled: false
628
648
  Rails/Validation:
629
649
  Enabled: false
650
+ Security/Eval:
651
+ Enabled: false
630
652
  Security/JSONLoad:
631
653
  Enabled: false
654
+ Security/MarshalLoad:
655
+ Enabled: false
656
+ Security/YAMLLoad:
657
+ Enabled: false
@@ -69,6 +69,11 @@ Style/InlineComment:
69
69
  Description: 'Avoid trailing inline comments.'
70
70
  Enabled: false
71
71
 
72
+ Style/MethodCallWithArgsParentheses:
73
+ Description: 'Use parentheses for method calls with arguments.'
74
+ StyleGuide: '#method-invocation-parens'
75
+ Enabled: false
76
+
72
77
  Style/MethodCalledOnDoEndBlock:
73
78
  Description: 'Avoid chaining a method call on a do...end block.'
74
79
  StyleGuide: '#single-line-blocks'
@@ -113,3 +118,7 @@ Style/SymbolArray:
113
118
  Description: 'Use %i or %I for arrays of symbols.'
114
119
  StyleGuide: '#percent-i'
115
120
  Enabled: false
121
+
122
+ Style/SingleLineBlockParams:
123
+ Description: 'Enforces the names of some block params.'
124
+ Enabled: false
@@ -244,6 +244,11 @@ Style/EmptyLiteral:
244
244
  StyleGuide: '#literal-array-hash'
245
245
  Enabled: true
246
246
 
247
+ Style/EmptyMethod:
248
+ Description: 'Checks the formatting of empty method definitions.'
249
+ StyleGuide: '#no-single-line-methods'
250
+ Enabled: true
251
+
247
252
  Style/EndBlock:
248
253
  Description: 'Avoid the use of END blocks.'
249
254
  StyleGuide: '#no-END-blocks'
@@ -399,7 +404,7 @@ Style/LineEndConcatenation:
399
404
  line end.
400
405
  Enabled: true
401
406
 
402
- Style/MethodCallParentheses:
407
+ Style/MethodCallWithoutArgsParentheses:
403
408
  Description: 'Do not use parentheses for method calls with no arguments.'
404
409
  StyleGuide: '#method-invocation-parens'
405
410
  Enabled: true
@@ -602,7 +607,7 @@ Style/ParenthesesAroundCondition:
602
607
  Description: >-
603
608
  Don't use parentheses around the condition of an
604
609
  if/unless/while.
605
- StyleGuide: '#no-parens-if'
610
+ StyleGuide: '#no-parens-around-condition'
606
611
  Enabled: true
607
612
 
608
613
  Style/PercentLiteralDelimiters:
@@ -705,10 +710,6 @@ Style/SignalException:
705
710
  StyleGuide: '#prefer-raise-over-fail'
706
711
  Enabled: true
707
712
 
708
- Style/SingleLineBlockParams:
709
- Description: 'Enforces the names of some block params.'
710
- Enabled: true
711
-
712
713
  Style/SingleLineMethods:
713
714
  Description: 'Avoid single-line methods.'
714
715
  StyleGuide: '#no-single-line-methods'
@@ -1115,10 +1116,6 @@ Lint/EnsureReturn:
1115
1116
  StyleGuide: '#no-return-ensure'
1116
1117
  Enabled: true
1117
1118
 
1118
- Lint/Eval:
1119
- Description: 'The use of eval represents a serious security risk.'
1120
- Enabled: true
1121
-
1122
1119
  Lint/FloatOutOfRange:
1123
1120
  Description: >-
1124
1121
  Catches floating-point literals too large or small for Ruby to
@@ -1171,6 +1168,10 @@ Lint/Loop:
1171
1168
  StyleGuide: '#loop-with-break'
1172
1169
  Enabled: true
1173
1170
 
1171
+ Lint/MultipleCompare:
1172
+ Description: "Use `&&` operator to compare multiple value."
1173
+ Enabled: true
1174
+
1174
1175
  Lint/NestedMethodDefinition:
1175
1176
  Description: 'Do not use nested method definitions.'
1176
1177
  StyleGuide: '#no-nested-methods'
@@ -1220,6 +1221,10 @@ Lint/RescueException:
1220
1221
  StyleGuide: '#no-blind-rescues'
1221
1222
  Enabled: true
1222
1223
 
1224
+ Lint/SafeNavigationChain:
1225
+ Description: 'Do not chain ordinary method call after safe navigation operator.'
1226
+ Enabled: true
1227
+
1223
1228
  Lint/ShadowedException:
1224
1229
  Description: >-
1225
1230
  Avoid rescuing a higher level exception
@@ -1274,6 +1279,7 @@ Lint/UselessAccessModifier:
1274
1279
  Description: 'Checks for useless access modifiers.'
1275
1280
  Enabled: true
1276
1281
  ContextCreatingMethods: []
1282
+ MethodCreatingMethods: []
1277
1283
 
1278
1284
  Lint/UselessAssignment:
1279
1285
  Description: 'Checks for useless assignment to a local variable.'
@@ -1403,6 +1409,10 @@ Performance/RedundantSortBy:
1403
1409
  Description: 'Use `sort` instead of `sort_by { |x| x }`.'
1404
1410
  Enabled: true
1405
1411
 
1412
+ Performance/RegexpMatch:
1413
+ Description: 'Use `match?` instead of `Regexp#match`, `String#match`, `Symbol#match`, `Regexp#===` or `=~` when `MatchData` is not used.'
1414
+ Enabled: true
1415
+
1406
1416
  Performance/ReverseEach:
1407
1417
  Description: 'Use `reverse_each` instead of `reverse.each`.'
1408
1418
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#enumerablereverseeach-vs-enumerablereverse_each-code'
@@ -1422,7 +1432,7 @@ Performance/Size:
1422
1432
  Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
1423
1433
  Enabled: true
1424
1434
 
1425
- Performance/SortWithBlock:
1435
+ Performance/CompareWithBlock:
1426
1436
  Description: 'Use `sort_by(&:foo)` instead of `sort_by { |a, b| a.foo <=> b.foo }`.'
1427
1437
  Enabled: true
1428
1438
 
@@ -1472,6 +1482,10 @@ Rails/DynamicFindBy:
1472
1482
  StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
1473
1483
  Enabled: true
1474
1484
 
1485
+ Rails/EnumUniqueness:
1486
+ Description: 'Avoid duplicate integers in hash-syntax `enum` declaration.'
1487
+ Enabled: true
1488
+
1475
1489
  Rails/Exit:
1476
1490
  Description: >-
1477
1491
  Favor `fail`, `break`, `return`, etc. over `exit` in
@@ -1479,6 +1493,10 @@ Rails/Exit:
1479
1493
  exits during unit testing or running in production.
1480
1494
  Enabled: true
1481
1495
 
1496
+ Rails/FilePath:
1497
+ Description: 'Use `Rails.root.join` for file path joining.'
1498
+ Enabled: true
1499
+
1482
1500
  Rails/FindBy:
1483
1501
  Description: 'Prefer find_by over where.first.'
1484
1502
  StyleGuide: 'https://github.com/bbatsov/rails-style-guide#find_by'
@@ -1528,6 +1546,12 @@ Rails/RequestReferer:
1528
1546
  Description: 'Use consistent syntax for request.referer.'
1529
1547
  Enabled: true
1530
1548
 
1549
+ Rails/ReversibleMigration:
1550
+ Description: 'Checks whether the change method of the migration file is reversible.'
1551
+ StyleGuide: 'https://github.com/bbatsov/rails-style-guide#reversible-migration'
1552
+ Reference: 'http://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html'
1553
+ Enabled: true
1554
+
1531
1555
  Rails/SafeNavigation:
1532
1556
  Description: "Use Ruby's safe navigation operator (`&.`) instead of `try!`"
1533
1557
  Enabled: true
@@ -1546,10 +1570,21 @@ Rails/UniqBeforePluck:
1546
1570
  Description: 'Prefer the use of uniq or distinct before pluck.'
1547
1571
  Enabled: true
1548
1572
 
1573
+ Rails/SkipsModelValidations:
1574
+ Description: >-
1575
+ Use methods that skips model validations with caution.
1576
+ See reference for more information.
1577
+ Reference: 'http://guides.rubyonrails.org/active_record_validations.html#skipping-validations'
1578
+ Enabled: true
1579
+
1549
1580
  Rails/Validation:
1550
1581
  Description: 'Use validates :attribute, hash of validations.'
1551
1582
  Enabled: true
1552
1583
 
1584
+ Security/Eval:
1585
+ Description: 'The use of eval represents a serious security risk.'
1586
+ Enabled: true
1587
+
1553
1588
  Security/JSONLoad:
1554
1589
  Description: >-
1555
1590
  Prefer usage of `JSON.parse` over `JSON.load` due to potential
@@ -1559,3 +1594,35 @@ Security/JSONLoad:
1559
1594
  # Autocorrect here will change to a method that may cause crashes depending
1560
1595
  # on the value of the argument.
1561
1596
  AutoCorrect: false
1597
+
1598
+ Security/MarshalLoad:
1599
+ Description: >-
1600
+ Avoid using of `Marshal.load` or `Marshal.restore` due to potential
1601
+ security issues. See reference for more information.
1602
+ Reference: 'http://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations'
1603
+ Enabled: true
1604
+
1605
+ Security/YAMLLoad:
1606
+ Description: >-
1607
+ Prefer usage of `YAML.safe_load` over `YAML.load` due to potential
1608
+ security issues. See reference for more information.
1609
+ Reference: 'https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security'
1610
+ Enabled: true
1611
+
1612
+ ##################### Bundler #############################
1613
+
1614
+ Bundler/DuplicatedGem:
1615
+ Description: 'Checks for duplicate gem entries in Gemfile.'
1616
+ Enabled: true
1617
+ Include:
1618
+ - '**/Gemfile'
1619
+ - '**/gems.rb'
1620
+
1621
+ Bundler/OrderedGems:
1622
+ Description: >-
1623
+ Sort alphabetically gems appearing within a contiguous set
1624
+ of lines in the Gemfile
1625
+ Enabled: true
1626
+ Include:
1627
+ - '**/Gemfile'
1628
+ - '**/gems.rb'
@@ -29,35 +29,35 @@ AllCops:
29
29
  - '**/*Fastfile'
30
30
  Exclude:
31
31
  - 'vendor/**/*'
32
- # Default formatter will be used if no -f/--format option is given.
32
+ # Default formatter will be used if no `-f/--format` option is given.
33
33
  DefaultFormatter: progress
34
34
  # Cop names are not displayed in offense messages by default. Change behavior
35
- # by overriding DisplayCopNames, or by giving the -D/--display-cop-names
35
+ # by overriding DisplayCopNames, or by giving the `-D/--display-cop-names`
36
36
  # option.
37
37
  DisplayCopNames: false
38
38
  # Style guide URLs are not displayed in offense messages by default. Change
39
- # behavior by overriding DisplayStyleGuide, or by giving the
40
- # -S/--display-style-guide option.
39
+ # behavior by overriding `DisplayStyleGuide`, or by giving the
40
+ # `-S/--display-style-guide` option.
41
41
  DisplayStyleGuide: false
42
42
  # When specifying style guide URLs, any paths and/or fragments will be
43
43
  # evaluated relative to the base URL.
44
44
  StyleGuideBaseURL: https://github.com/bbatsov/ruby-style-guide
45
45
  # Extra details are not displayed in offense messages by default. Change
46
46
  # behavior by overriding ExtraDetails, or by giving the
47
- # -E/--extra-details option.
47
+ # `-E/--extra-details` option.
48
48
  ExtraDetails: false
49
49
  # Additional cops that do not reference a style guide rule may be enabled by
50
- # default. Change behavior by overriding StyleGuideCopsOnly, or by giving
51
- # the --only-guide-cops option.
50
+ # default. Change behavior by overriding `StyleGuideCopsOnly`, or by giving
51
+ # the `--only-guide-cops` option.
52
52
  StyleGuideCopsOnly: false
53
53
  # All cops except the ones in disabled.yml are enabled by default. Change
54
- # this behavior by overriding DisabledByDefault. When DisabledByDefault is
55
- # true, all cops in the default configuration are disabled, and and only cops
54
+ # this behavior by overriding `DisabledByDefault`. When `DisabledByDefault` is
55
+ # `true`, all cops in the default configuration are disabled, and only cops
56
56
  # in user configuration are enabled. This makes cops opt-in instead of
57
- # opt-out. Note that when DisabledByDefault is true, cops in user
57
+ # opt-out. Note that when `DisabledByDefault` is `true`, cops in user
58
58
  # configuration will be enabled even if they don't set the Enabled parameter.
59
59
  DisabledByDefault: false
60
- # Enables the result cache if true. Can be overridden by the --cache command
60
+ # Enables the result cache if `true`. Can be overridden by the `--cache` command
61
61
  # line option.
62
62
  UseCache: true
63
63
  # Threshold for how many files can be stored in the result cache before some
@@ -113,6 +113,10 @@ Style/AlignHash:
113
113
  # 'a' => 2
114
114
  # 'bb' => 3
115
115
  EnforcedHashRocketStyle: key
116
+ SupportedHashRocketStyles:
117
+ - key
118
+ - separator
119
+ - table
116
120
  # Alignment of entries using colon as separator. Valid values are:
117
121
  #
118
122
  # key - left alignment of keys
@@ -125,6 +129,10 @@ Style/AlignHash:
125
129
  # a: 0
126
130
  # bb: 1
127
131
  EnforcedColonStyle: key
132
+ SupportedColonStyles:
133
+ - key
134
+ - separator
135
+ - table
128
136
  # Select whether hashes that are the last argument in a method call should be
129
137
  # inspected? Valid values are:
130
138
  #
@@ -194,7 +202,7 @@ Style/AndOr:
194
202
  - conditionals
195
203
 
196
204
 
197
- # Checks if usage of %() or %Q() matches configuration.
205
+ # Checks if usage of `%()` or `%Q()` matches configuration.
198
206
  Style/BarePercentLiterals:
199
207
  EnforcedStyle: bare_percent
200
208
  SupportedStyles:
@@ -288,14 +296,14 @@ Style/BracesAroundHashParameters:
288
296
 
289
297
  # Indentation of `when`.
290
298
  Style/CaseIndentation:
291
- IndentWhenRelativeTo: case
299
+ EnforcedStyle: case
292
300
  SupportedStyles:
293
301
  - case
294
302
  - end
295
303
  IndentOneStep: false
296
- # By default, the indentation width from Style/IndentationWidth is used
297
- # But it can be overridden by setting this parameter
298
- # This only matters if IndentOneStep is true
304
+ # By default, the indentation width from `Style/IndentationWidth` is used.
305
+ # But it can be overridden by setting this parameter.
306
+ # This only matters if `IndentOneStep` is `true`
299
307
  IndentationWidth: ~
300
308
 
301
309
  Style/ClassAndModuleChildren:
@@ -313,7 +321,7 @@ Style/ClassAndModuleChildren:
313
321
  # class Foo::Bar
314
322
  # end
315
323
  #
316
- # The compact style is only forced, for classes / modules with one child.
324
+ # The compact style is only forced, for classes or modules with one child.
317
325
  EnforcedStyle: nested
318
326
  SupportedStyles:
319
327
  - nested
@@ -340,17 +348,17 @@ Style/CollectionMethods:
340
348
  detect: 'find'
341
349
  find_all: 'select'
342
350
 
343
- # Use ` or %x around command literals.
351
+ # Use '`' or '%x' around command literals.
344
352
  Style/CommandLiteral:
345
353
  EnforcedStyle: backticks
346
354
  # backticks: Always use backticks.
347
- # percent_x: Always use %x.
348
- # mixed: Use backticks on single-line commands, and %x on multi-line commands.
355
+ # percent_x: Always use `%x`.
356
+ # mixed: Use backticks on single-line commands, and `%x` on multi-line commands.
349
357
  SupportedStyles:
350
358
  - backticks
351
359
  - percent_x
352
360
  - mixed
353
- # If false, the cop will always recommend using %x if one or more backticks
361
+ # If `false`, the cop will always recommend using `%x` if one or more backticks
354
362
  # are found in the command string.
355
363
  AllowInnerBackticks: false
356
364
 
@@ -375,14 +383,15 @@ Style/ConditionalAssignment:
375
383
  # will only register an offense for assignment to a condition that has
376
384
  # at least one multiline branch.
377
385
  SingleLineConditionsOnly: true
386
+ IncludeTernaryExpressions: true
378
387
 
379
388
  # Checks that you have put a copyright in a comment before any code.
380
389
  #
381
390
  # You can override the default Notice in your .rubocop.yml file.
382
391
  #
383
392
  # In order to use autocorrect, you must supply a value for the
384
- # AutocorrectNotice key that matches the regexp Notice. A blank
385
- # AutocorrectNotice will cause an error during autocorrect.
393
+ # `AutocorrectNotice` key that matches the regexp Notice. A blank
394
+ # `AutocorrectNotice` will cause an error during autocorrect.
386
395
  #
387
396
  # Autocorrect will add a copyright notice in a comment at the top
388
397
  # of the file immediately after any shebang or encoding comments.
@@ -409,9 +418,9 @@ Style/DotPosition:
409
418
  - trailing
410
419
 
411
420
  # Warn on empty else statements
412
- # empty - warn only on empty else
413
- # nil - warn on else with nil in it
414
- # both - warn on empty else and else with nil in it
421
+ # empty - warn only on empty `else`
422
+ # nil - warn on `else` with nil in it
423
+ # both - warn on empty `else` and `else` with nil in it
415
424
  Style/EmptyElse:
416
425
  EnforcedStyle: both
417
426
  SupportedStyles:
@@ -421,7 +430,7 @@ Style/EmptyElse:
421
430
 
422
431
  # Use empty lines between defs.
423
432
  Style/EmptyLineBetweenDefs:
424
- # If true, this parameter means that single line method definitions don't
433
+ # If `true`, this parameter means that single line method definitions don't
425
434
  # need an empty line between them.
426
435
  AllowAdjacentOneLineDefs: false
427
436
 
@@ -436,6 +445,7 @@ Style/EmptyLinesAroundClassBody:
436
445
  SupportedStyles:
437
446
  - empty_lines
438
447
  - empty_lines_except_namespace
448
+ - empty_lines_special
439
449
  - no_empty_lines
440
450
 
441
451
  Style/EmptyLinesAroundModuleBody:
@@ -443,8 +453,15 @@ Style/EmptyLinesAroundModuleBody:
443
453
  SupportedStyles:
444
454
  - empty_lines
445
455
  - empty_lines_except_namespace
456
+ - empty_lines_special
446
457
  - no_empty_lines
447
458
 
459
+ Style/EmptyMethod:
460
+ EnforcedStyle: compact
461
+ SupportedStyles:
462
+ - compact
463
+ - expanded
464
+
448
465
  # Checks whether the source file has a utf-8 encoding comment or not
449
466
  # AutoCorrectEncodingComment must match the regex
450
467
  # /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
@@ -461,19 +478,19 @@ Style/ExtraSpacing:
461
478
  # things with the previous or next line, not counting empty lines or comment
462
479
  # lines.
463
480
  AllowForAlignment: true
464
- # When true, forces the alignment of = in assignments on consecutive lines.
481
+ # When true, forces the alignment of `=` in assignments on consecutive lines.
465
482
  ForceEqualSignAlignment: false
466
483
 
467
484
  Style/FileName:
468
- # File names listed in AllCops:Include are excluded by default. Add extra
485
+ # File names listed in `AllCops:Include` are excluded by default. Add extra
469
486
  # excludes here.
470
487
  Exclude: []
471
- # When true, requires that each source file should define a class or module
488
+ # When `true`, requires that each source file should define a class or module
472
489
  # with a name which matches the file name (converted to ... case).
473
490
  # It further expects it to be nested inside modules which match the names
474
491
  # of subdirectories in its path.
475
492
  ExpectMatchingDefinition: false
476
- # If non-nil, expect all source file names to match the following regex.
493
+ # If non-`nil`, expect all source file names to match the following regex.
477
494
  # Only the file name itself is matched, not the entire file path.
478
495
  # Use anchors as necessary if you want to match the entire name rather than
479
496
  # just a part of it.
@@ -482,6 +499,47 @@ Style/FileName:
482
499
  # report offending filenames for executable scripts (i.e. source
483
500
  # files with a shebang in the first line).
484
501
  IgnoreExecutableScripts: true
502
+ AllowedAcronyms:
503
+ - CLI
504
+ - DSL
505
+ - ACL
506
+ - API
507
+ - ASCII
508
+ - CPU
509
+ - CSS
510
+ - DNS
511
+ - EOF
512
+ - GUID
513
+ - HTML
514
+ - HTTP
515
+ - HTTPS
516
+ - ID
517
+ - IP
518
+ - JSON
519
+ - LHS
520
+ - QPS
521
+ - RAM
522
+ - RHS
523
+ - RPC
524
+ - SLA
525
+ - SMTP
526
+ - SQL
527
+ - SSH
528
+ - TCP
529
+ - TLS
530
+ - TTL
531
+ - UDP
532
+ - UI
533
+ - UID
534
+ - UUID
535
+ - URI
536
+ - URL
537
+ - UTF8
538
+ - VM
539
+ - XML
540
+ - XMPP
541
+ - XSRF
542
+ - XSS
485
543
 
486
544
  Style/FirstParameterIndentation:
487
545
  EnforcedStyle: special_for_inner_method_call_in_parentheses
@@ -494,10 +552,10 @@ Style/FirstParameterIndentation:
494
552
  # a parameter in a method call, then the inner parameter should be indented
495
553
  # relative to the inner method.
496
554
  - special_for_inner_method_call
497
- # Same as special_for_inner_method_call except that the special rule only
555
+ # Same as `special_for_inner_method_call` except that the special rule only
498
556
  # applies if the outer method call encloses its arguments in parentheses.
499
557
  - special_for_inner_method_call_in_parentheses
500
- # By default, the indentation width from Style/IndentationWidth is used
558
+ # By default, the indentation width from `Style/IndentationWidth` is used
501
559
  # But it can be overridden by setting this parameter
502
560
  IndentationWidth: ~
503
561
 
@@ -527,12 +585,15 @@ Style/FrozenStringLiteralComment:
527
585
  # string literal. If you run code against multiple versions of Ruby, it is
528
586
  # possible that this will create errors in Ruby 2.3.0+.
529
587
  - always
588
+ # `never` will enforce that the frozen string literal comment does not
589
+ # exist in a file.
590
+ - never
530
591
 
531
592
  # Built-in global variables are allowed by default.
532
593
  Style/GlobalVars:
533
594
  AllowedVariables: []
534
595
 
535
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
596
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
536
597
  # needs to have to trigger this cop
537
598
  Style/GuardClause:
538
599
  MinBodyLength: 1
@@ -590,13 +651,13 @@ Style/IndentArray:
590
651
  - special_inside_parentheses
591
652
  - consistent
592
653
  - align_brackets
593
- # By default, the indentation width from Style/IndentationWidth is used
654
+ # By default, the indentation width from `Style/IndentationWidth` is used
594
655
  # But it can be overridden by setting this parameter
595
656
  IndentationWidth: ~
596
657
 
597
658
  # Checks the indentation of assignment RHS, when on a different line from LHS
598
659
  Style/IndentAssignment:
599
- # By default, the indentation width from Style/IndentationWidth is used
660
+ # By default, the indentation width from `Style/IndentationWidth` is used
600
661
  # But it can be overridden by setting this parameter
601
662
  IndentationWidth: ~
602
663
 
@@ -618,7 +679,7 @@ Style/IndentHash:
618
679
  - special_inside_parentheses
619
680
  - consistent
620
681
  - align_braces
621
- # By default, the indentation width from Style/IndentationWidth is used
682
+ # By default, the indentation width from `Style/IndentationWidth` is used
622
683
  # But it can be overridden by setting this parameter
623
684
  IndentationWidth: ~
624
685
 
@@ -646,7 +707,7 @@ Style/Next:
646
707
  # replaced by next - with `skip_modifier_ifs` the modifier if like this one
647
708
  # are ignored: [1, 2].each { |a| return 'yes' if a == 1 }
648
709
  EnforcedStyle: skip_modifier_ifs
649
- # `MinBodyLength` defines the number of lines of the a body of an if / unless
710
+ # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless`
650
711
  # needs to have to trigger this cop
651
712
  MinBodyLength: 3
652
713
  SupportedStyles:
@@ -679,6 +740,9 @@ Style/MethodDefParentheses:
679
740
  - require_no_parentheses
680
741
  - require_no_parentheses_except_multiline
681
742
 
743
+ Style/MethodCallWithArgsParentheses:
744
+ IgnoredMethods: []
745
+
682
746
  Style/MethodName:
683
747
  EnforcedStyle: snake_case
684
748
  SupportedStyles:
@@ -764,7 +828,7 @@ Style/MultilineOperationIndentation:
764
828
  SupportedStyles:
765
829
  - aligned
766
830
  - indented
767
- # By default, the indentation width from Style/IndentationWidth is used
831
+ # By default, the indentation width from `Style/IndentationWidth` is used
768
832
  # But it can be overridden by setting this parameter
769
833
  IndentationWidth: ~
770
834
 
@@ -806,8 +870,8 @@ Style/PercentLiteralDelimiters:
806
870
  Style/PercentQLiterals:
807
871
  EnforcedStyle: lower_case_q
808
872
  SupportedStyles:
809
- - lower_case_q # Use %q when possible, %Q when necessary
810
- - upper_case_q # Always use %Q
873
+ - lower_case_q # Use `%q` when possible, `%Q` when necessary
874
+ - upper_case_q # Always use `%Q`
811
875
 
812
876
  Style/PredicateName:
813
877
  # Predicate name prefixes.
@@ -820,7 +884,7 @@ Style/PredicateName:
820
884
  - is_
821
885
  - has_
822
886
  - have_
823
- # Predicate names which, despite having a blacklisted prefix, or no ?,
887
+ # Predicate names which, despite having a blacklisted prefix, or no `?`,
824
888
  # should still be accepted
825
889
  NameWhitelist:
826
890
  - is_a?
@@ -842,20 +906,20 @@ Style/RaiseArgs:
842
906
  - exploded # raise Exception, msg
843
907
 
844
908
  Style/RedundantReturn:
845
- # When true allows code like `return x, y`.
909
+ # When `true` allows code like `return x, y`.
846
910
  AllowMultipleReturnValues: false
847
911
 
848
- # Use / or %r around regular expressions.
912
+ # Use `/` or `%r` around regular expressions.
849
913
  Style/RegexpLiteral:
850
914
  EnforcedStyle: slashes
851
915
  # slashes: Always use slashes.
852
- # percent_r: Always use %r.
853
- # mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
916
+ # percent_r: Always use `%r`.
917
+ # mixed: Use slashes on single-line regexes, and `%r` on multi-line regexes.
854
918
  SupportedStyles:
855
919
  - slashes
856
920
  - percent_r
857
921
  - mixed
858
- # If false, the cop will always recommend using %r if one or more slashes
922
+ # If `false`, the cop will always recommend using `%r` if one or more slashes
859
923
  # are found in the regexp string.
860
924
  AllowInnerSlashes: false
861
925
 
@@ -865,7 +929,7 @@ Style/SafeNavigation:
865
929
  ConvertCodeThatCanStartToReturnNil: false
866
930
 
867
931
  Style/Semicolon:
868
- # Allow ; to separate several expressions on the same line.
932
+ # Allow `;` to separate several expressions on the same line.
869
933
  AllowAsExpressionSeparator: false
870
934
 
871
935
  Style/SignalException:
@@ -888,7 +952,7 @@ Style/SingleLineMethods:
888
952
  AllowIfMethodIsEmpty: true
889
953
 
890
954
  Style/SpaceBeforeFirstArg:
891
- # When true, allows most uses of extra spacing if the intent is to align
955
+ # When `true`, allows most uses of extra spacing if the intent is to align
892
956
  # things with the previous or next line, not counting empty lines or comment
893
957
  # lines.
894
958
  AllowForAlignment: true
@@ -910,7 +974,7 @@ Style/StringLiterals:
910
974
  SupportedStyles:
911
975
  - single_quotes
912
976
  - double_quotes
913
- # If true, strings which span multiple lines using \ for continuation must
977
+ # If `true`, strings which span multiple lines using `\` for continuation must
914
978
  # use the same type of quotes on each line.
915
979
  ConsistentQuotesInMultiline: false
916
980
 
@@ -932,7 +996,7 @@ Style/StringMethods:
932
996
 
933
997
  Style/SpaceAroundBlockParameters:
934
998
  EnforcedStyleInsidePipes: no_space
935
- SupportedStyles:
999
+ SupportedStylesInsidePipes:
936
1000
  - space
937
1001
  - no_space
938
1002
 
@@ -943,7 +1007,7 @@ Style/SpaceAroundEqualsInParameterDefault:
943
1007
  - no_space
944
1008
 
945
1009
  Style/SpaceAroundOperators:
946
- # When true, allows most uses of extra spacing if the intent is to align
1010
+ # When `true`, allows most uses of extra spacing if the intent is to align
947
1011
  # with an operator on the previous or next line, not counting empty lines
948
1012
  # or comment lines.
949
1013
  AllowForAlignment: true
@@ -959,20 +1023,25 @@ Style/SpaceInsideBlockBraces:
959
1023
  SupportedStyles:
960
1024
  - space
961
1025
  - no_space
962
- # Valid values are: space, no_space
963
1026
  EnforcedStyleForEmptyBraces: no_space
1027
+ SupportedStylesForEmptyBraces:
1028
+ - space
1029
+ - no_space
964
1030
  # Space between { and |. Overrides EnforcedStyle if there is a conflict.
965
1031
  SpaceBeforeBlockParameters: true
966
1032
 
967
1033
  Style/SpaceInsideHashLiteralBraces:
968
1034
  EnforcedStyle: space
969
- EnforcedStyleForEmptyBraces: no_space
970
1035
  SupportedStyles:
971
1036
  - space
972
1037
  - no_space
973
1038
  # 'compact' normally requires a space inside hash braces, with the exception
974
1039
  # that successive left braces or right braces are collapsed together
975
1040
  - compact
1041
+ EnforcedStyleForEmptyBraces: no_space
1042
+ SupportedStylesForEmptyBraces:
1043
+ - space
1044
+ - no_space
976
1045
 
977
1046
  Style/SpaceInsideStringInterpolation:
978
1047
  EnforcedStyle: no_space
@@ -998,6 +1067,7 @@ Style/TernaryParentheses:
998
1067
  SupportedStyles:
999
1068
  - require_parentheses
1000
1069
  - require_no_parentheses
1070
+ - require_parentheses_when_complex
1001
1071
  AllowSafeAssignment: true
1002
1072
 
1003
1073
  Style/TrailingBlankLines:
@@ -1012,7 +1082,7 @@ Style/TrailingCommaInArguments:
1012
1082
  # If `consistent_comma`, the cop requires a comma after the last argument,
1013
1083
  # for all parenthesized method calls with arguments.
1014
1084
  EnforcedStyleForMultiline: no_comma
1015
- SupportedStyles:
1085
+ SupportedStylesForMultiline:
1016
1086
  - comma
1017
1087
  - consistent_comma
1018
1088
  - no_comma
@@ -1023,7 +1093,7 @@ Style/TrailingCommaInLiteral:
1023
1093
  # If `consistent_comma`, the cop requires a comma after the last item of all
1024
1094
  # non-empty array and hash literals.
1025
1095
  EnforcedStyleForMultiline: no_comma
1026
- SupportedStyles:
1096
+ SupportedStylesForMultiline:
1027
1097
  - comma
1028
1098
  - consistent_comma
1029
1099
  - no_comma
@@ -1031,7 +1101,7 @@ Style/TrailingCommaInLiteral:
1031
1101
  # TrivialAccessors requires exact name matches and doesn't allow
1032
1102
  # predicated methods by default.
1033
1103
  Style/TrivialAccessors:
1034
- # When set to false the cop will suggest the use of accessor methods
1104
+ # When set to `false` the cop will suggest the use of accessor methods
1035
1105
  # in situations like:
1036
1106
  #
1037
1107
  # def name
@@ -1086,7 +1156,7 @@ Style/VariableNumber:
1086
1156
  Style/WhileUntilModifier:
1087
1157
  MaxLineLength: 80
1088
1158
 
1089
- # WordArray enforces how array literals of word-like strings should be expressed.
1159
+ # `WordArray` enforces how array literals of word-like strings should be expressed.
1090
1160
  Style/WordArray:
1091
1161
  EnforcedStyle: percent
1092
1162
  SupportedStyles:
@@ -1094,11 +1164,11 @@ Style/WordArray:
1094
1164
  - percent
1095
1165
  # bracket style: ['word1', 'word2']
1096
1166
  - brackets
1097
- # The MinSize option causes the WordArray rule to be ignored for arrays
1167
+ # The `MinSize` option causes the `WordArray` rule to be ignored for arrays
1098
1168
  # smaller than a certain size. The rule is only applied to arrays
1099
- # whose element count is greater than or equal to MinSize.
1169
+ # whose element count is greater than or equal to `MinSize`.
1100
1170
  MinSize: 0
1101
- # The regular expression WordRegex decides what is considered a word.
1171
+ # The regular expression `WordRegex` decides what is considered a word.
1102
1172
  WordRegex: !ruby/regexp '/\A[\p{Word}\n\t]+\z/'
1103
1173
 
1104
1174
  ##################### Metrics ##################################
@@ -1109,6 +1179,7 @@ Metrics/AbcSize:
1109
1179
  Max: 15
1110
1180
 
1111
1181
  Metrics/BlockNesting:
1182
+ CountBlocks: false
1112
1183
  Max: 3
1113
1184
 
1114
1185
  Metrics/ClassLength:
@@ -1135,6 +1206,10 @@ Metrics/LineLength:
1135
1206
  # The IgnoreCopDirectives option causes the LineLength rule to ignore cop
1136
1207
  # directives like '# rubocop: enable ...' when calculating a line's length.
1137
1208
  IgnoreCopDirectives: false
1209
+ # The IgnoredPatterns option is a list of !ruby/regexp and/or string
1210
+ # elements. Strings will be converted to Regexp objects. A line that matches
1211
+ # any regular expression listed in this option will be ignored by LineLength.
1212
+ IgnoredPatterns: []
1138
1213
 
1139
1214
  Metrics/MethodLength:
1140
1215
  CountComments: false # count full line comments?
@@ -1143,10 +1218,7 @@ Metrics/MethodLength:
1143
1218
  Metrics/BlockLength:
1144
1219
  CountComments: false # count full line comments?
1145
1220
  Max: 25
1146
- Exclude:
1147
- - 'Rakefile'
1148
- - '**/*.rake'
1149
- - 'spec/**/*.rb'
1221
+ ExcludedMethods: []
1150
1222
 
1151
1223
  Metrics/ParameterLists:
1152
1224
  Max: 5
@@ -1168,8 +1240,8 @@ Lint/BlockAlignment:
1168
1240
  # The value `start_of_line` means it should be aligned with the whole
1169
1241
  # expression's starting line.
1170
1242
  # The value `either` means both are allowed.
1171
- AlignWith: either
1172
- SupportedStyles:
1243
+ EnforcedStyleAlignWith: either
1244
+ SupportedStylesAlignWith:
1173
1245
  - either
1174
1246
  - start_of_block
1175
1247
  - start_of_line
@@ -1177,14 +1249,14 @@ Lint/BlockAlignment:
1177
1249
  # Align ends correctly.
1178
1250
  Lint/EndAlignment:
1179
1251
  # The value `keyword` means that `end` should be aligned with the matching
1180
- # keyword (if, while, etc.).
1252
+ # keyword (`if`, `while`, etc.).
1181
1253
  # The value `variable` means that in assignments, `end` should be aligned
1182
1254
  # with the start of the variable on the left hand side of `=`. In all other
1183
1255
  # situations, `end` should still be aligned with the keyword.
1184
1256
  # The value `start_of_line` means that `end` should be aligned with the start
1185
1257
  # of the line which the matching keyword appears on.
1186
- AlignWith: keyword
1187
- SupportedStyles:
1258
+ EnforcedStyleAlignWith: keyword
1259
+ SupportedStylesAlignWith:
1188
1260
  - keyword
1189
1261
  - variable
1190
1262
  - start_of_line
@@ -1195,8 +1267,8 @@ Lint/DefEndAlignment:
1195
1267
  # The value `start_of_line` means that `end` should be aligned with method
1196
1268
  # calls like `private`, `public`, etc, if present in front of the `def`
1197
1269
  # keyword on the same line.
1198
- AlignWith: start_of_line
1199
- SupportedStyles:
1270
+ EnforcedStyleAlignWith: start_of_line
1271
+ SupportedStylesAlignWith:
1200
1272
  - start_of_line
1201
1273
  - def
1202
1274
  AutoCorrect: false
@@ -1249,6 +1321,10 @@ Rails/DynamicFindBy:
1249
1321
  Whitelist:
1250
1322
  - find_by_sql
1251
1323
 
1324
+ Rails/EnumUniqueness:
1325
+ Include:
1326
+ - app/models/**/*.rb
1327
+
1252
1328
  Rails/Exit:
1253
1329
  Include:
1254
1330
  - app/**/*.rb
@@ -1290,6 +1366,10 @@ Rails/RequestReferer:
1290
1366
  - referer
1291
1367
  - referrer
1292
1368
 
1369
+ Rails/ReversibleMigration:
1370
+ Include:
1371
+ - db/migrate/*.rb
1372
+
1293
1373
  Rails/SafeNavigation:
1294
1374
  # This will convert usages of `try` to use safe navigation as well as `try!`.
1295
1375
  # `try` and `try!` work slighly differently. `try!` and safe navigation will
@@ -1310,12 +1390,26 @@ Rails/TimeZone:
1310
1390
  - flexible
1311
1391
 
1312
1392
  Rails/UniqBeforePluck:
1313
- EnforcedMode: conservative
1314
- SupportedModes:
1393
+ EnforcedStyle: conservative
1394
+ SupportedStyles:
1315
1395
  - conservative
1316
1396
  - aggressive
1317
1397
  AutoCorrect: false
1318
1398
 
1399
+ Rails/SkipsModelValidations:
1400
+ Blacklist:
1401
+ - decrement!
1402
+ - decrement_counter
1403
+ - increment!
1404
+ - increment_counter
1405
+ - toggle!
1406
+ - touch
1407
+ - update_all
1408
+ - update_attribute
1409
+ - update_column
1410
+ - update_columns
1411
+ - update_counters
1412
+
1319
1413
  Rails/Validation:
1320
1414
  Include:
1321
1415
  - app/models/**/*.rb
@@ -1,4 +1,4 @@
1
1
  module Lcgstyle
2
- VERSION = "0.0.7".freeze
3
- RUBOCOP_VERSION = "0.45.0".freeze
2
+ VERSION = "0.0.8".freeze
3
+ RUBOCOP_VERSION = "0.47.1".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lcgstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-21 00:00:00.000000000 Z
11
+ date: 2017-02-09 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.45.0
61
+ version: 0.47.1
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.45.0
68
+ version: 0.47.1
69
69
  description:
70
70
  email:
71
71
  - thom@chef.io
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.6.8
115
+ rubygems_version: 2.6.9
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Rubocop configuration for Chef's ruby projects