cookstyle 7.5.3 → 7.6.1

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: 7c9e534b328ad67e11c08f3aad0fa8380bcc11f48659c15ad13cf9eacdfdd1fb
4
- data.tar.gz: 9822c6e1a3b3b98a37533c5d281c09719ca9d13a02280d8be3c45b12f06f7da3
3
+ metadata.gz: 94c65d786aaf2a303f8bdc1d56aa5e486d54149362ecd24cd502e0bbacbe2ded
4
+ data.tar.gz: 713071ed03eb0a3095ff8fe4e0205deaa3cb51230717661a276c3e7b9593b3fe
5
5
  SHA512:
6
- metadata.gz: a011a3c3532e811a988d8f87533bc3595920f9863d9151c994aaf7aa8115073fee0f05419a3ec0cb07498f0934adee5d8acc89f97441b092b87a4ebb4b6be5c0
7
- data.tar.gz: d6d42efac3a6438c9aa00309b4c4987a1c82c03d9187f7e237d0e493de221137bd02f196436f0e6fe2d9ec1f56a1ec242c2f44aeb8a20da50147de0311eeca61
6
+ metadata.gz: b46edc9f54e8233b750ca4ad575184bb65e134398b7c5fb5ac58e0c2e3b2c69679a53e13efb9f4ca282d26f31ae5bf6a711567fa5c4c6e8d5e3549cc623c3f99
7
+ data.tar.gz: c2cd89d013da57b588b75ccaccc8331fc2c13122992f586a0672d4fdbdcb0b34968144366ac04c7556bd4b861af684f566f9fd391b4b3a5e005bee0789d605ca
@@ -2803,3 +2803,7 @@ Lint/RedundantSafeNavigation:
2803
2803
  # Avoid using blocks to remove nils from a Hash/Array
2804
2804
  Style/CollectionCompact:
2805
2805
  Enabled: true
2806
+
2807
+ # eventually these constants are going to break code so fix them
2808
+ Lint/DeprecatedConstants:
2809
+ Enabled: true
@@ -229,6 +229,8 @@ Lint/Debugger:
229
229
  Enabled: false
230
230
  Lint/DeprecatedClassMethods:
231
231
  Enabled: false
232
+ Lint/DeprecatedConstants:
233
+ Enabled: false
232
234
  Lint/DeprecatedOpenSSLConstant:
233
235
  Enabled: false
234
236
  Lint/DisjunctiveAssignmentInConstructor:
@@ -295,6 +297,8 @@ Lint/IneffectiveAccessModifier:
295
297
  Enabled: false
296
298
  Lint/InterpolationCheck:
297
299
  Enabled: false
300
+ Lint/LambdaWithoutLiteralBlock:
301
+ Enabled: false
298
302
  Lint/LiteralAsCondition:
299
303
  Enabled: false
300
304
  Lint/LiteralInInterpolation:
@@ -323,6 +327,10 @@ Lint/NonLocalExitFromIterator:
323
327
  Enabled: false
324
328
  Lint/NumberConversion:
325
329
  Enabled: false
330
+ Lint/NumberedParameterAssignment:
331
+ Enabled: false
332
+ Lint/OrAssignmentToConstant:
333
+ Enabled: false
326
334
  Lint/OrderedMagicComments:
327
335
  Enabled: false
328
336
  Lint/OutOfRangeRegexpRef:
@@ -341,6 +349,8 @@ Lint/RedundantCopDisableDirective:
341
349
  Enabled: false
342
350
  Lint/RedundantCopEnableDirective:
343
351
  Enabled: false
352
+ Lint/RedundantDirGlobSort:
353
+ Enabled: false
344
354
  Lint/RedundantRequireStatement:
345
355
  Enabled: false
346
356
  Lint/RedundantSafeNavigation:
@@ -385,6 +395,8 @@ Lint/StructNewOverride:
385
395
  Enabled: false
386
396
  Lint/SuppressedException:
387
397
  Enabled: false
398
+ Lint/SymbolConversion:
399
+ Enabled: false
388
400
  Lint/Syntax:
389
401
  Enabled: false
390
402
  Lint/ToEnumArguments:
@@ -395,6 +407,8 @@ Lint/TopLevelReturnWithArgument:
395
407
  Enabled: false
396
408
  Lint/TrailingCommaInAttributeDeclaration:
397
409
  Enabled: false
410
+ Lint/TripleQuotes:
411
+ Enabled: false
398
412
  Lint/UnderscorePrefixedVariableName:
399
413
  Enabled: false
400
414
  Lint/UnexpectedBlockArity:
@@ -583,6 +597,8 @@ Style/EmptyLiteral:
583
597
  Enabled: false
584
598
  Style/EmptyMethod:
585
599
  Enabled: false
600
+ Style/EndlessMethod:
601
+ Enabled: false
586
602
  Style/Encoding:
587
603
  Enabled: false
588
604
  Style/EndBlock:
@@ -635,6 +651,8 @@ Style/IfUnlessModifier:
635
651
  Enabled: false
636
652
  Style/IfUnlessModifierOfIfUnless:
637
653
  Enabled: false
654
+ Style/IfWithBooleanLiteralBranches:
655
+ Enabled: false
638
656
  Style/IfWithSemicolon:
639
657
  Enabled: false
640
658
  Style/ImplicitRuntimeError:
@@ -132,12 +132,13 @@ AllCops:
132
132
  # If a value is specified for TargetRubyVersion then it is used. Acceptable
133
133
  # values are specificed as a float (i.e. 2.5); the teeny version of Ruby
134
134
  # should not be included. If the project specifies a Ruby version in the
135
- # .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
136
- # the desired version of Ruby by inspecting the .ruby-version file first,
137
- # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
138
- # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
139
- # from the lock file.) If the Ruby version is still unresolved, RuboCop will
140
- # use the oldest officially supported Ruby version (currently Ruby 2.4).
135
+ # .tool-versions or .ruby-version files, Gemfile or gems.rb file, RuboCop will
136
+ # try to determine the desired version of Ruby by inspecting the
137
+ # .tool-versions file first, then .ruby-version, followed by the Gemfile.lock
138
+ # or gems.locked file. (Although the Ruby version is specified in the Gemfile
139
+ # or gems.rb file, RuboCop reads the final value from the lock file.) If the
140
+ # Ruby version is still unresolved, RuboCop will use the oldest officially
141
+ # supported Ruby version (currently Ruby 2.4).
141
142
  TargetRubyVersion: ~
142
143
  # Determines if a notification for extension libraries should be shown when
143
144
  # rubocop is run. Keys are the name of the extension, and values are an array
@@ -1197,7 +1198,6 @@ Layout/SpaceBeforeBrackets:
1197
1198
  StyleGuide: '#space-in-brackets-access'
1198
1199
  Enabled: pending
1199
1200
  VersionAdded: '1.7'
1200
- Safe: false
1201
1201
 
1202
1202
  Layout/SpaceBeforeComma:
1203
1203
  Description: 'No spaces before commas.'
@@ -1469,6 +1469,34 @@ Lint/DeprecatedClassMethods:
1469
1469
  Enabled: true
1470
1470
  VersionAdded: '0.19'
1471
1471
 
1472
+ Lint/DeprecatedConstants:
1473
+ Description: 'Checks for deprecated constants.'
1474
+ Enabled: pending
1475
+ VersionAdded: '1.8'
1476
+ # You can configure deprecated constants.
1477
+ # If there is an alternative method, you can set alternative value as `Alternative`.
1478
+ # And you can set the deprecated version as `DeprecatedVersion`.
1479
+ # These options can be omitted if they are not needed.
1480
+ #
1481
+ # DeprecatedConstants:
1482
+ # 'DEPRECATED_CONSTANT':
1483
+ # Alternative: 'alternative_value'
1484
+ # DeprecatedVersion: 'deprecated_version'
1485
+ #
1486
+ DeprecatedConstants:
1487
+ 'NIL':
1488
+ Alternative: 'nil'
1489
+ DeprecatedVersion: '2.4'
1490
+ 'TRUE':
1491
+ Alternative: 'true'
1492
+ DeprecatedVersion: '2.4'
1493
+ 'FALSE':
1494
+ Alternative: 'false'
1495
+ DeprecatedVersion: '2.4'
1496
+ 'Random::DEFAULT':
1497
+ Alternative: 'Random.new'
1498
+ DeprecatedVersion: '3.0'
1499
+
1472
1500
  Lint/DeprecatedOpenSSLConstant:
1473
1501
  Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
1474
1502
  Enabled: true
@@ -1674,6 +1702,11 @@ Lint/InterpolationCheck:
1674
1702
  VersionAdded: '0.50'
1675
1703
  VersionChanged: '0.87'
1676
1704
 
1705
+ Lint/LambdaWithoutLiteralBlock:
1706
+ Description: 'Checks uses of lambda without a literal block.'
1707
+ Enabled: pending
1708
+ VersionAdded: '1.8'
1709
+
1677
1710
  Lint/LiteralAsCondition:
1678
1711
  Description: 'Checks of literals used in conditions.'
1679
1712
  Enabled: true
@@ -1773,6 +1806,17 @@ Lint/NumberConversion:
1773
1806
  - Time
1774
1807
  - DateTime
1775
1808
 
1809
+ Lint/NumberedParameterAssignment:
1810
+ Description: 'Checks for uses of numbered parameter assignment.'
1811
+ Enabled: pending
1812
+ VersionAdded: '1.9'
1813
+
1814
+ Lint/OrAssignmentToConstant:
1815
+ Description: 'Checks unintended or-assignment to constant.'
1816
+ Enabled: pending
1817
+ Safe: false
1818
+ VersionAdded: '1.9'
1819
+
1776
1820
  Lint/OrderedMagicComments:
1777
1821
  Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
1778
1822
  Enabled: true
@@ -1836,6 +1880,11 @@ Lint/RedundantCopEnableDirective:
1836
1880
  Enabled: true
1837
1881
  VersionAdded: '0.76'
1838
1882
 
1883
+ Lint/RedundantDirGlobSort:
1884
+ Description: 'Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.'
1885
+ Enabled: pending
1886
+ VersionAdded: '1.8'
1887
+
1839
1888
  Lint/RedundantRequireStatement:
1840
1889
  Description: 'Checks for unnecessary `require` statement.'
1841
1890
  Enabled: true
@@ -1994,12 +2043,16 @@ Lint/SuppressedException:
1994
2043
  VersionAdded: '0.9'
1995
2044
  VersionChanged: '0.81'
1996
2045
 
2046
+ Lint/SymbolConversion:
2047
+ Description: 'Checks for unnecessary symbol conversions.'
2048
+ Enabled: pending
2049
+ VersionAdded: '1.9'
2050
+
1997
2051
  Lint/Syntax:
1998
- Description: 'Checks syntax error.'
2052
+ Description: 'Checks for syntax errors.'
1999
2053
  Enabled: true
2000
2054
  VersionAdded: '0.9'
2001
2055
 
2002
-
2003
2056
  Lint/ToEnumArguments:
2004
2057
  Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
2005
2058
  Enabled: pending
@@ -2020,6 +2073,11 @@ Lint/TrailingCommaInAttributeDeclaration:
2020
2073
  Enabled: true
2021
2074
  VersionAdded: '0.90'
2022
2075
 
2076
+ Lint/TripleQuotes:
2077
+ Description: 'Checks for useless triple quote constructs.'
2078
+ Enabled: pending
2079
+ VersionAdded: '1.9'
2080
+
2023
2081
  Lint/UnderscorePrefixedVariableName:
2024
2082
  Description: 'Do not use prefix `_` for a variable that is used.'
2025
2083
  Enabled: true
@@ -2502,10 +2560,12 @@ Naming/VariableName:
2502
2560
  StyleGuide: '#snake-case-symbols-methods-vars'
2503
2561
  Enabled: true
2504
2562
  VersionAdded: '0.50'
2563
+ VersionChanged: '1.8'
2505
2564
  EnforcedStyle: snake_case
2506
2565
  SupportedStyles:
2507
2566
  - snake_case
2508
2567
  - camelCase
2568
+ AllowedIdentifiers: []
2509
2569
 
2510
2570
  Naming/VariableNumber:
2511
2571
  Description: 'Use the configured style when numbering symbols, methods and variables.'
@@ -2649,7 +2709,8 @@ Style/AsciiComments:
2649
2709
  Enabled: true
2650
2710
  VersionAdded: '0.9'
2651
2711
  VersionChanged: '0.52'
2652
- AllowedChars: []
2712
+ AllowedChars:
2713
+ - ©
2653
2714
 
2654
2715
  Style/Attr:
2655
2716
  Description: 'Checks for uses of Module#attr.'
@@ -3080,6 +3141,8 @@ Style/DisableCopsWithinSourceCodeDirective:
3080
3141
  Forbids disabling/enabling cops within source code.
3081
3142
  Enabled: false
3082
3143
  VersionAdded: '0.82'
3144
+ VersionChanged: '1.9'
3145
+ AllowedCops: []
3083
3146
 
3084
3147
  Style/DocumentDynamicEvalDefinition:
3085
3148
  Description: >-
@@ -3197,6 +3260,17 @@ Style/EndBlock:
3197
3260
  VersionAdded: '0.9'
3198
3261
  VersionChanged: '0.81'
3199
3262
 
3263
+ Style/EndlessMethod:
3264
+ Description: 'Avoid the use of multi-lined endless method definitions.'
3265
+ StyleGuide: '#endless-methods'
3266
+ Enabled: pending
3267
+ VersionAdded: '1.8'
3268
+ EnforcedStyle: allow_single_line
3269
+ SupportedStyles:
3270
+ - allow_single_line
3271
+ - allow_always
3272
+ - disallow
3273
+
3200
3274
  Style/EvalWithLocation:
3201
3275
  Description: 'Pass `__FILE__` and `__LINE__` to `eval` method, as they are used by backtraces.'
3202
3276
  Enabled: true
@@ -3220,9 +3294,8 @@ Style/ExplicitBlockArgument:
3220
3294
  that just passes its arguments to another block.
3221
3295
  StyleGuide: '#block-argument'
3222
3296
  Enabled: true
3223
- # May change the yielding arity.
3224
- Safe: false
3225
3297
  VersionAdded: '0.89'
3298
+ VersionChanged: '1.8'
3226
3299
 
3227
3300
  Style/ExponentialNotation:
3228
3301
  Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
@@ -3241,7 +3314,8 @@ Style/FloatDivision:
3241
3314
  Reference: 'https://blog.rubystyle.guide/ruby/2019/06/21/float-division.html'
3242
3315
  Enabled: true
3243
3316
  VersionAdded: '0.72'
3244
- VersionChanged: '1.6'
3317
+ VersionChanged: '1.9'
3318
+ Safe: false
3245
3319
  EnforcedStyle: single_coerce
3246
3320
  SupportedStyles:
3247
3321
  - left_coerce
@@ -3289,6 +3363,7 @@ Style/FormatStringToken:
3289
3363
  MaxUnannotatedPlaceholdersAllowed: 1
3290
3364
  VersionAdded: '0.49'
3291
3365
  VersionChanged: '1.0'
3366
+ IgnoredMethods: []
3292
3367
 
3293
3368
  Style/FrozenStringLiteralComment:
3294
3369
  Description: >-
@@ -3442,6 +3517,11 @@ Style/IfUnlessModifierOfIfUnless:
3442
3517
  VersionAdded: '0.39'
3443
3518
  VersionChanged: '0.87'
3444
3519
 
3520
+ Style/IfWithBooleanLiteralBranches:
3521
+ Description: 'Checks for redundant `if` with boolean literal branches.'
3522
+ Enabled: pending
3523
+ VersionAdded: '1.9'
3524
+
3445
3525
  Style/IfWithSemicolon:
3446
3526
  Description: 'Do not use if x; .... Use the ternary operator instead.'
3447
3527
  StyleGuide: '#no-semicolon-ifs'
@@ -3726,7 +3806,8 @@ Style/MutableConstant:
3726
3806
  Description: 'Do not assign mutable objects to constants.'
3727
3807
  Enabled: true
3728
3808
  VersionAdded: '0.34'
3729
- VersionChanged: '0.65'
3809
+ VersionChanged: '1.8'
3810
+ SafeAutoCorrect: false
3730
3811
  EnforcedStyle: literals
3731
3812
  SupportedStyles:
3732
3813
  # literals: freeze literals assigned to constants
@@ -4330,7 +4411,7 @@ Style/SingleLineMethods:
4330
4411
  StyleGuide: '#no-single-line-methods'
4331
4412
  Enabled: true
4332
4413
  VersionAdded: '0.9'
4333
- VersionChanged: '1.7'
4414
+ VersionChanged: '1.8'
4334
4415
  AllowIfMethodIsEmpty: true
4335
4416
 
4336
4417
  Style/SlicingWithRange:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Cookstyle
3
- VERSION = "7.5.3" # rubocop: disable Style/StringLiterals
4
- RUBOCOP_VERSION = '1.7.0'
3
+ VERSION = "7.6.1" # rubocop: disable Style/StringLiterals
4
+ RUBOCOP_VERSION = '1.9.0'
5
5
  end
@@ -74,7 +74,7 @@ module RuboCop
74
74
  when :str
75
75
  "'#{type.source}[#{name.value}]'"
76
76
  when :dstr
77
- "\"#{type.source}[#{name.value.source}]\""
77
+ "\"#{type.source}[#{name.value}]\""
78
78
  else
79
79
  "\"#{type.source}[\#{#{name.source}}]\""
80
80
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookstyle
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.5.3
4
+ version: 7.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-31 00:00:00.000000000 Z
12
+ date: 2021-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubocop
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 1.7.0
20
+ version: 1.9.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 1.7.0
27
+ version: 1.9.0
28
28
  description:
29
29
  email:
30
30
  - thom@chef.io
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  - !ruby/object:Gem::Version
304
304
  version: '0'
305
305
  requirements: []
306
- rubygems_version: 3.0.3
306
+ rubygems_version: 3.1.4
307
307
  signing_key:
308
308
  specification_version: 4
309
309
  summary: Cookstyle is a code linting tool that helps you to write better Chef Infra