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 +4 -4
- data/config/cookstyle.yml +3 -3
- data/config/disable_all.yml +2 -0
- data/config/upstream.yml +13 -0
- data/lib/cookstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/chef_application_fatal.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/conditional_ruby_shellout.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/dnf_package_allow_downgrades.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/incorrect_library_injection.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_family_helper.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_family_values_in_case.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_helper.rb +2 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_values_in_case.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_helper.rb +1 -1
- data/lib/rubocop/cop/chef/style/unnecessary_os_check.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f14be569aa75ce6cbc63f43ef13e5c5d3d0e51e3f2b26abb27cf6b41b4d569bb
|
|
4
|
+
data.tar.gz: 87a712993bfe562d10584493186d2f9380eec2eb33ed7b52d5706254da4b08fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
|
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
|
|
2724
|
+
# simplify hash access that doesn't actually need .dig
|
|
2725
2725
|
Style/SingleArgumentDig:
|
|
2726
2726
|
Enabled: true
|
|
2727
2727
|
|
data/config/disable_all.yml
CHANGED
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`
|
data/lib/cookstyle/version.rb
CHANGED
|
@@ -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 {}
|
|
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
|
|
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
|
|
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
|
-
# 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
|
|
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
|
|
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
|
|
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 `
|
|
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.
|
|
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-
|
|
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.
|
|
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.
|
|
27
|
+
version: 1.11.0
|
|
28
28
|
description:
|
|
29
29
|
email:
|
|
30
30
|
- thom@chef.io
|