cookstyle 7.9.0 → 7.10.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: f14be569aa75ce6cbc63f43ef13e5c5d3d0e51e3f2b26abb27cf6b41b4d569bb
4
- data.tar.gz: 87a712993bfe562d10584493186d2f9380eec2eb33ed7b52d5706254da4b08fb
3
+ metadata.gz: 43b95c34b0b50f91842f1f61197ce9a286ef1fe29c577b03f621ad45b1d01478
4
+ data.tar.gz: fbff813ff1b1fa700926e83c16899d1458ab648e0b1145c5fa426095bd5104c4
5
5
  SHA512:
6
- metadata.gz: 86b7f37b93c00abd3653020f87aa245328d013835a1902a2f47dac4a32cb6cc651fbb36abfa667ef85798f1bddb4a4d2350b461fd41eb89368df3dc5e815e58d
7
- data.tar.gz: 0fa5eb548ea0780d28b121e9ab83e3cd1548f7d75d2cc39d7e9e2d6e3f30427d98aa9ff6ac1a13ac8f7d43131cbcf74c032ebc3b0e6bef7fc9e8f449a3193dcd
6
+ metadata.gz: 2e75c020b8829915b9f03b4567352a495471a430fabbad7939eb2fe66e22f88f4754fd51bc0a2c41cad253ff991d4052bde1c1c398e7e36b1e27c0c383c14c69
7
+ data.tar.gz: b830d2d65e0efc803fd78194afcf22ddbf72a13138207b55643b6bd7823df22eb6173ab6ae07f117d0899f708f5b0dc517dc8824da1727477953b2c2f58eaa2b
@@ -851,6 +851,8 @@ Style/StabbyLambdaParentheses:
851
851
  Enabled: false
852
852
  Style/StderrPuts:
853
853
  Enabled: false
854
+ Style/StringChars:
855
+ Enabled: false
854
856
  Style/StringConcatenation:
855
857
  Enabled: false
856
858
  Style/StringHashKeys:
data/config/upstream.yml CHANGED
@@ -2055,13 +2055,18 @@ Lint/SuppressedException:
2055
2055
  StyleGuide: '#dont-hide-exceptions'
2056
2056
  Enabled: true
2057
2057
  AllowComments: true
2058
+ AllowNil: true
2058
2059
  VersionAdded: '0.9'
2059
- VersionChanged: '0.81'
2060
+ VersionChanged: '1.12'
2060
2061
 
2061
2062
  Lint/SymbolConversion:
2062
2063
  Description: 'Checks for unnecessary symbol conversions.'
2063
2064
  Enabled: pending
2064
2065
  VersionAdded: '1.9'
2066
+ EnforcedStyle: strict
2067
+ SupportedStyles:
2068
+ - strict
2069
+ - consistent
2065
2070
 
2066
2071
  Lint/Syntax:
2067
2072
  Description: 'Checks for syntax errors.'
@@ -2489,6 +2494,7 @@ Naming/MemoizedInstanceVariableName:
2489
2494
  - disallowed
2490
2495
  - required
2491
2496
  - optional
2497
+ Safe: false
2492
2498
 
2493
2499
  Naming/MethodName:
2494
2500
  Description: 'Use the configured style when naming methods.'
@@ -3174,6 +3180,7 @@ Style/Documentation:
3174
3180
  Description: 'Document classes and non-namespace modules.'
3175
3181
  Enabled: true
3176
3182
  VersionAdded: '0.9'
3183
+ AllowedConstants: []
3177
3184
  Exclude:
3178
3185
  - 'spec/**/*'
3179
3186
  - 'test/**/*'
@@ -3672,6 +3679,7 @@ Style/MethodCallWithArgsParentheses:
3672
3679
  AllowParenthesesInMultilineCall: false
3673
3680
  AllowParenthesesInChaining: false
3674
3681
  AllowParenthesesInCamelCaseMethod: false
3682
+ AllowParenthesesInStringInterpolation: false
3675
3683
  EnforcedStyle: require_parentheses
3676
3684
  SupportedStyles:
3677
3685
  - require_parentheses
@@ -4491,6 +4499,13 @@ Style/StderrPuts:
4491
4499
  Enabled: true
4492
4500
  VersionAdded: '0.51'
4493
4501
 
4502
+ Style/StringChars:
4503
+ Description: 'Checks for uses of `String#split` with empty string or regexp literal argument.'
4504
+ StyleGuide: '#string-chars'
4505
+ Enabled: pending
4506
+ Safe: false
4507
+ VersionAdded: '1.12'
4508
+
4494
4509
  Style/StringConcatenation:
4495
4510
  Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
4496
4511
  StyleGuide: '#string-interpolation'
data/lib/cookstyle.rb CHANGED
@@ -7,7 +7,7 @@ require 'yaml' unless defined?(YAML)
7
7
  # ensure the desired target version of RuboCop is gem activated
8
8
  gem 'rubocop', "= #{Cookstyle::RUBOCOP_VERSION}"
9
9
  require 'rubocop'
10
- require_relative 'rubocop/monkey_patches/comment_config'
10
+ require_relative 'rubocop/monkey_patches/directive_comment'
11
11
 
12
12
  # monkey patches needed for the TargetChefVersion config option
13
13
  require_relative 'rubocop/monkey_patches/config'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Cookstyle
3
- VERSION = "7.9.0" # rubocop: disable Style/StringLiterals
4
- RUBOCOP_VERSION = '1.11.0'
3
+ VERSION = "7.10.0" # rubocop: disable Style/StringLiterals
4
+ RUBOCOP_VERSION = '1.12.0'
5
5
  end
@@ -2,10 +2,11 @@
2
2
  module RuboCop
3
3
  # we're monkey patching the config regex to allow for # cookstyle: disable whatever
4
4
  # in addition to the # rubocop: disable whatever that comes with RuboCop
5
- class CommentConfig
6
- remove_const('COMMENT_DIRECTIVE_REGEXP')
7
- COMMENT_DIRECTIVE_REGEXP = Regexp.new(
8
- "# (?:rubocop|cookstyle): ((?:disable|enable|todo))\\b #{COPS_PATTERN}".gsub(' ', '\s*')
5
+ class DirectiveComment
6
+ remove_const('DIRECTIVE_COMMENT_REGEXP')
7
+ DIRECTIVE_COMMENT_REGEXP = Regexp.new(
8
+ "# (?:rubocop|cookstyle) : ((?:disable|enable|todo))\\b #{COPS_PATTERN}"
9
+ .gsub(' ', '\s*')
9
10
  )
10
11
  end
11
12
  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.9.0
4
+ version: 7.10.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: 2021-03-08 00:00:00.000000000 Z
12
+ date: 2021-03-24 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.11.0
20
+ version: 1.12.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.11.0
27
+ version: 1.12.0
28
28
  description:
29
29
  email:
30
30
  - thom@chef.io
@@ -275,8 +275,8 @@ files:
275
275
  - lib/rubocop/cop/chef/style/use_platform_helpers.rb
276
276
  - lib/rubocop/cop/target_chef_version.rb
277
277
  - lib/rubocop/monkey_patches/base.rb
278
- - lib/rubocop/monkey_patches/comment_config.rb
279
278
  - lib/rubocop/monkey_patches/config.rb
279
+ - lib/rubocop/monkey_patches/directive_comment.rb
280
280
  - lib/rubocop/monkey_patches/registry_cop.rb
281
281
  - lib/rubocop/monkey_patches/team.rb
282
282
  homepage: https://docs.chef.io/workstation/cookstyle/