cookstyle 6.8.0 → 6.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: df67335031d87f8782e6511ad4e1fbbf3dc40e5b9cfdec6f9cee45c6acd3cb38
4
- data.tar.gz: 52a46161cd9e6d11643ae5b2b945347d69fac127f14878ebe1875d0cb1b34cd4
3
+ metadata.gz: b65eaf5352ddaf7aa98b395f94211e6c8ff7f408d17d869a4fa4e0dd7f33931a
4
+ data.tar.gz: 7f09b6880e5301bc2e41c97b9d6dc4eb2d6e8cc33d6ed1621c7cd4b7c04ba530
5
5
  SHA512:
6
- metadata.gz: bb3a7a9c0cd62c6b664d659c565c0a48d3f496fa371e26349030539c8ddbfa6d30c4f7545d5c2b33f5bf268b7348867e4d010626488286c86b9bb1e720cb3ae1
7
- data.tar.gz: 8af9e42d0f12bc1b0c262a341a60bee272831afb40cf3ff89ddbbf9865115c6d3162d4da4df85636e84c7391c8d75db776b5cd574c7c280aa09971d63674dd03
6
+ metadata.gz: 942e6f7efeb10b18996de509b6c9af74f2e33b691e3778df3e0a8c1b6530d7b848362bfb45a0521531cb2a143e68b27f8b1d9867606e6b6132f9f0a92e286d3b
7
+ data.tar.gz: b6356cf4266f6bd9162f13de266e3f8390614004b4a7cb13f2a50f3c9e2be70338b7d6dc8bdeb3fb5d8605f5acbf9b87e4f42fd293c4ad280999650ad3023c0f
@@ -211,6 +211,8 @@ Lint/BooleanSymbol:
211
211
  Enabled: false
212
212
  Lint/CircularArgumentReference:
213
213
  Enabled: false
214
+ Lint/ConstantResolution:
215
+ Enabled: false
214
216
  Lint/Debugger:
215
217
  Enabled: false
216
218
  Lint/DeprecatedClassMethods:
@@ -565,6 +567,8 @@ Style/MethodCallWithoutArgsParentheses:
565
567
  Enabled: false
566
568
  Style/MethodCallWithArgsParentheses:
567
569
  Enabled: false
570
+ Style/RedundantFetchBlock:
571
+ Enabled: false
568
572
  Style/MethodCalledOnDoEndBlock:
569
573
  Enabled: false
570
574
  Style/MethodDefParentheses:
@@ -1361,6 +1361,15 @@ Lint/CircularArgumentReference:
1361
1361
  Enabled: true
1362
1362
  VersionAdded: '0.33'
1363
1363
 
1364
+ Lint/ConstantResolution:
1365
+ Description: 'Check that constants are fully qualified with `::`.'
1366
+ Enabled: false
1367
+ VersionAdded: '0.86'
1368
+ # Restrict this cop to only looking at certain names
1369
+ Only: []
1370
+ # Restrict this cop from only looking at certain names
1371
+ Ignore: []
1372
+
1364
1373
  Lint/Debugger:
1365
1374
  Description: 'Check for debugger calls.'
1366
1375
  Enabled: true
@@ -1611,7 +1620,9 @@ Lint/RaiseException:
1611
1620
  Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
1612
1621
  StyleGuide: '#raise-exception'
1613
1622
  Enabled: pending
1623
+ Safe: false
1614
1624
  VersionAdded: '0.81'
1625
+ VersionChanged: '0.86'
1615
1626
  AllowedImplicitNamespaces:
1616
1627
  - 'Gem'
1617
1628
 
@@ -1668,6 +1679,7 @@ Lint/RegexpAsCondition:
1668
1679
  The regexp literal matches `$_` implicitly.
1669
1680
  Enabled: true
1670
1681
  VersionAdded: '0.51'
1682
+ VersionChanged: '0.86'
1671
1683
 
1672
1684
  Lint/RequireParentheses:
1673
1685
  Description: >-
@@ -1925,7 +1937,7 @@ Metrics/CyclomaticComplexity:
1925
1937
  VersionAdded: '0.25'
1926
1938
  VersionChanged: '0.81'
1927
1939
  IgnoredMethods: []
1928
- Max: 6
1940
+ Max: 7
1929
1941
 
1930
1942
  Metrics/MethodLength:
1931
1943
  Description: 'Avoid methods longer than 10 lines of code.'
@@ -3239,6 +3251,7 @@ Style/MultilineTernaryOperator:
3239
3251
  StyleGuide: '#no-multiline-ternary'
3240
3252
  Enabled: true
3241
3253
  VersionAdded: '0.9'
3254
+ VersionChanged: '0.86'
3242
3255
 
3243
3256
  Style/MultilineWhenThen:
3244
3257
  Description: 'Do not use then for multi-line when statement.'
@@ -3343,6 +3356,7 @@ Style/NestedTernaryOperator:
3343
3356
  StyleGuide: '#no-nested-ternary'
3344
3357
  Enabled: true
3345
3358
  VersionAdded: '0.9'
3359
+ VersionChanged: '0.86'
3346
3360
 
3347
3361
  Style/Next:
3348
3362
  Description: 'Use `next` to skip iteration instead of a condition at the end.'
@@ -3596,6 +3610,19 @@ Style/RedundantException:
3596
3610
  VersionAdded: '0.14'
3597
3611
  VersionChanged: '0.29'
3598
3612
 
3613
+ Style/RedundantFetchBlock:
3614
+ Description: >-
3615
+ Use `fetch(key, value)` instead of `fetch(key) { value }`
3616
+ when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
3617
+ Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
3618
+ Enabled: 'pending'
3619
+ Safe: false
3620
+ # If enabled, this cop will autocorrect usages of
3621
+ # `fetch` being called with block returning a constant.
3622
+ # This can be dangerous since constants will not be defined at that moment.
3623
+ SafeForConstants: false
3624
+ VersionAdded: '0.86'
3625
+
3599
3626
  Style/RedundantFreeze:
3600
3627
  Description: "Checks usages of Object#freeze on immutable objects."
3601
3628
  Enabled: true
@@ -3875,6 +3902,7 @@ Style/StructInheritance:
3875
3902
  StyleGuide: '#no-extend-struct-new'
3876
3903
  Enabled: true
3877
3904
  VersionAdded: '0.29'
3905
+ VersionChanged: '0.86'
3878
3906
 
3879
3907
  Style/SymbolArray:
3880
3908
  Description: 'Use %i or %I for arrays of symbols.'
@@ -1,4 +1,4 @@
1
1
  module Cookstyle
2
- VERSION = "6.8.0".freeze # rubocop: disable Style/StringLiterals
3
- RUBOCOP_VERSION = '0.85.1'.freeze
2
+ VERSION = "6.9.0".freeze # rubocop: disable Style/StringLiterals
3
+ RUBOCOP_VERSION = '0.86.0'.freeze
4
4
  end
@@ -36,7 +36,7 @@ module RuboCop
36
36
 
37
37
  def on_send(node)
38
38
  version?(node) do |ver|
39
- if ver.value !~ /\A\d+\.\d+(\.\d+)?\z/ # entirely borrowed from Foodcritic.
39
+ unless /\A\d+\.\d+(\.\d+)?\z/.match?(ver.value) # entirely borrowed from Foodcritic.
40
40
  add_offense(ver, location: :expression, message: MSG, severity: :refactor)
41
41
  end
42
42
  end
@@ -483,7 +483,7 @@ module RuboCop
483
483
 
484
484
  def valid_license?(license)
485
485
  VALID_LICENSE_STRING.include?(license) ||
486
- license.downcase == 'all rights reserved'
486
+ license.casecmp('all rights reserved') == 0
487
487
  end
488
488
  end
489
489
  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: 6.8.0
4
+ version: 6.9.0
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-06-08 00:00:00.000000000 Z
12
+ date: 2020-06-25 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: 0.85.1
20
+ version: 0.86.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: 0.85.1
27
+ version: 0.86.0
28
28
  description:
29
29
  email:
30
30
  - thom@chef.io