cookstyle 7.8.3 → 7.9.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: e04dd24b5b97c48a31e63a92a6d333c5c43bc4a4548d7f478a1568c3a6852f04
4
- data.tar.gz: c03fcc110f131b4d0d4d094d13e8d3f7027c3f995d19e9b31f7ef37308e112e8
3
+ metadata.gz: f14be569aa75ce6cbc63f43ef13e5c5d3d0e51e3f2b26abb27cf6b41b4d569bb
4
+ data.tar.gz: 87a712993bfe562d10584493186d2f9380eec2eb33ed7b52d5706254da4b08fb
5
5
  SHA512:
6
- metadata.gz: 85afba2dca8cf6626f58c7cb42ce79f2e9b41c9f2e4eef8833988130d1cb4376de34942ad8fb4337271f5c4b6b15f5e32f31443620227c719379f993850dd34d
7
- data.tar.gz: a4a02a5e22bdd2b39d2b867c7a669a24fb4b324558ed6073971674f1155323736aac2bb1446fa73e0c073b6e84a36a96a6c0986d1e027feb73fcd4ec9f953c18
6
+ metadata.gz: 86b7f37b93c00abd3653020f87aa245328d013835a1902a2f47dac4a32cb6cc651fbb36abfa667ef85798f1bddb4a4d2350b461fd41eb89368df3dc5e815e58d
7
+ data.tar.gz: 0fa5eb548ea0780d28b121e9ab83e3cd1548f7d75d2cc39d7e9e2d6e3f30427d98aa9ff6ac1a13ac8f7d43131cbcf74c032ebc3b0e6bef7fc9e8f449a3193dcd
data/config/cookstyle.yml CHANGED
@@ -843,7 +843,7 @@ Chef/Deprecations/DeprecatedYumRepositoryProperties:
843
843
  - '**/Berksfile'
844
844
 
845
845
  Chef/Deprecations/EOLAuditModeUsage:
846
- Description: The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more informmation.
846
+ Description: The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more information.
847
847
  StyleGuide: 'chef_deprecations_eolauditmodeusage'
848
848
  Enabled: true
849
849
  VersionAdded: '5.10.0'
@@ -905,7 +905,7 @@ Chef/Deprecations/PartialSearchClassUsage:
905
905
  - '**/metadata.rb'
906
906
 
907
907
  Chef/Deprecations/Cheffile:
908
- Description: The Libarian-Chef depsolving project is no longer maintained and should not be used for cookbook depsolving. Consider using Policyfiles instead.
908
+ Description: The Librarian-Chef depsolving project is no longer maintained and should not be used for cookbook depsolving. Consider using Policyfiles instead.
909
909
  StyleGuide: 'chef_deprecations_cheffile'
910
910
  Enabled: true
911
911
  VersionAdded: '5.12.0'
@@ -2721,7 +2721,7 @@ Lint/BinaryOperatorWithIdenticalOperands:
2721
2721
  # Lint/TopLevelReturnWithArgument:
2722
2722
  # Enabled: true
2723
2723
 
2724
- # simplify hash acccess that doesn't actually need .dig
2724
+ # simplify hash access that doesn't actually need .dig
2725
2725
  Style/SingleArgumentDig:
2726
2726
  Enabled: true
2727
2727
 
@@ -897,6 +897,8 @@ Style/TrivialAccessors:
897
897
  Enabled: false
898
898
  Style/UnlessElse:
899
899
  Enabled: false
900
+ Style/UnlessLogicalOperators:
901
+ Enabled: false
900
902
  Style/UnpackFirst:
901
903
  Enabled: false
902
904
  Style/VariableInterpolation:
data/config/upstream.yml CHANGED
@@ -3446,6 +3446,8 @@ Style/HashConversion:
3446
3446
  Description: 'Avoid Hash[] in favor of ary.to_h or literal hashes.'
3447
3447
  Enabled: pending
3448
3448
  VersionAdded: '1.10'
3449
+ VersionChanged: '1.11'
3450
+ AllowSplatArgument: true
3449
3451
 
3450
3452
  Style/HashEachMethods:
3451
3453
  Description: 'Use Hash#each_key and Hash#each_value.'
@@ -4586,6 +4588,7 @@ Style/SymbolProc:
4586
4588
  Safe: false
4587
4589
  VersionAdded: '0.26'
4588
4590
  VersionChanged: '1.5'
4591
+ AllowMethodsWithArguments: false
4589
4592
  # A list of method names to be ignored by the check.
4590
4593
  # The names should be fairly unique, otherwise you'll end up ignoring lots of code.
4591
4594
  IgnoredMethods:
@@ -4738,6 +4741,16 @@ Style/UnlessElse:
4738
4741
  Enabled: true
4739
4742
  VersionAdded: '0.9'
4740
4743
 
4744
+ Style/UnlessLogicalOperators:
4745
+ Description: >-
4746
+ Checks for use of logical operators in an unless condition.
4747
+ Enabled: false
4748
+ VersionAdded: '1.11'
4749
+ EnforcedStyle: forbid_mixed_logical_operators
4750
+ SupportedStyles:
4751
+ - forbid_mixed_logical_operators
4752
+ - forbid_logical_operators
4753
+
4741
4754
  Style/UnpackFirst:
4742
4755
  Description: >-
4743
4756
  Checks for accessing the first element of `String#unpack`
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module Cookstyle
3
- VERSION = "7.8.3" # rubocop: disable Style/StringLiterals
4
- RUBOCOP_VERSION = '1.10.0'
3
+ VERSION = "7.9.0" # rubocop: disable Style/StringLiterals
4
+ RUBOCOP_VERSION = '1.11.0'
5
5
  end
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # A resource guard (not_if/only_if) that is a string should not be wrapped in {}. Wrapping a guard string in {} causes it to be executed as Ruby code which will always returns true instead of a shell command that will actually run.
22
+ # A resource guard (not_if/only_if) that is a string should not be wrapped in `{}`. Wrapping a guard string in {} causes it to be executed as Ruby code which will always returns true instead of a shell command that will actually run.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Use raise to force Chef Infra Client to fail instead of using Chef::Application.fatal, which masks the full stack trace of the failure and makes debugging difficult.
22
+ # Use `raise` to force Chef Infra Client to fail instead of using `Chef::Application.fatal`, which masks the full stack trace of the failure and makes debugging difficult.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Don't use Ruby to shellout in a only_if / not_if conditional when you can just shellout directly. Any string value used with only_if / not_if is executed in your system's shell and the return code of the command is the result for the not_if / only_if determination.
22
+ # Don't use Ruby to shellout in a `only_if` / `not_if` conditional. Any string value used in an `only_if` / `not_if` is executed in your system's shell and the return code of the command is the result for the `not_if` / `only_if` determination.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # dnf_package does not support the allow_downgrades property
22
+ # The `dnf_package` resource does not support the `allow_downgrades` property.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Libraries should be injected into the Chef::DSL::Recipe class and not Chef::Recipe or Chef::Provider classes directly.
22
+ # Libraries should be injected into the `Chef::DSL::Recipe` class and not `Chef::Recipe` or `Chef::Provider` classes directly.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Valid notification timings are :immediately, :immediate (alias for :immediately), :delayed, and :before.
22
+ # Valid notification timings are `:immediately`, `:immediate` (alias for :immediately), `:delayed`, and `:before`.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Pass valid platform families to the platform_family? helper.
22
+ # Pass valid platform families to the `platform_family?` helper. See [Infra Language: Platform Family](https://docs.chef.io/infra_language/checking_platforms/#platform_family-values) for a complete list of platform families.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Use valid platform family values in case statements.
22
+ # Use valid platform family values in case statements. See [Infra Language: Platform Family](https://docs.chef.io/infra_language/checking_platforms/#platform_family-values) for a complete list of platform families.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Pass valid platforms to the platform? helper.
22
+ # Pass valid platforms to the `platform?` helper. See [Infra Language: Platform](https://docs.chef.io/infra_language/checking_platforms/#platform-values) for a list of many common platform values.
23
23
  #
24
24
  # @example
25
25
  #
@@ -32,6 +32,7 @@ module RuboCop
32
32
  # platform?('mac_os_x')
33
33
  # platform?('redhat)
34
34
  # platform?('suse')
35
+ #
35
36
  class InvalidPlatformHelper < Base
36
37
  include ::RuboCop::Chef::PlatformHelpers
37
38
 
@@ -20,7 +20,7 @@ module RuboCop
20
20
  module Cop
21
21
  module Chef
22
22
  module Correctness
23
- # metadata.rb supports methods should contain valid platforms.
23
+ # metadata.rb supports methods should contain valid platforms. See [Infra Language: Platform](https://docs.chef.io/infra_language/checking_platforms/#platform-values) for a list of many common platform values.
24
24
  #
25
25
  # @example
26
26
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Use valid platform values in case statements.
22
+ # Use valid platform values in case statements. See [Infra Language: Platform](https://docs.chef.io/infra_language/checking_platforms/#platform-values) for a list of many common platform values.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Pass valid platforms families to the value_for_platform_family helper.
22
+ # Pass valid platforms families to the value_for_platform_family helper. See [Infra Language: Platform Family](https://docs.chef.io/infra_language/checking_platforms/#platform_family-values) for a complete list of platform families.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Correctness
22
- # Pass valid platforms to the value_for_platform helper.
22
+ # Pass valid platforms to the value_for_platform helper. See [Infra Language: Platform](https://docs.chef.io/infra_language/checking_platforms/#platform-values) for a list of many common platform values.
23
23
  #
24
24
  # @example
25
25
  #
@@ -19,7 +19,7 @@ module RuboCop
19
19
  module Cop
20
20
  module Chef
21
21
  module Style
22
- # Use the platform_family?() helpers instead of node['os] == 'foo' for platform_families that match one-to-one with OS values. These helpers are easier to read and can accept multiple platform arguments, which greatly simplifies complex platform logic. All values of `os` from Ohai match one-to-one with `platform_family` values except for `linux`, which has no single equivalent `plaform_family`.
22
+ # Use the platform_family?() helpers instead of node['os] == 'foo' for platform_families that match one-to-one with OS values. These helpers are easier to read and can accept multiple platform arguments, which greatly simplifies complex platform logic. All values of `os` from Ohai match one-to-one with `platform_family` values except for `linux`, which has no single equivalent `platform_family`.
23
23
  #
24
24
  # @example
25
25
  #
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.8.3
4
+ version: 7.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: 2021-02-17 00:00:00.000000000 Z
12
+ date: 2021-03-08 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.10.0
20
+ version: 1.11.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.10.0
27
+ version: 1.11.0
28
28
  description:
29
29
  email:
30
30
  - thom@chef.io