cookstyle 8.5.2 → 8.6.4
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/chefstyle.yml +11 -3
- data/config/cookstyle.yml +159 -151
- data/cookstyle.gemspec +1 -1
- data/lib/cookstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/chef_application_fatal.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/conditional_ruby_shellout.rb +3 -3
- data/lib/rubocop/cop/chef/correctness/dnf_package_allow_downgrades.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/empty_resource_guard.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/incorrect_library_injection.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_cookbook_name.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_default_action.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_notification_resource.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_platform_family_helper.rb +2 -2
- 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 -2
- data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_platform_values_in_case.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_helper.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/invalid_version_metadata.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/lazy_in_resource_guard.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/macos_userdefaults_invalid_type.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/malformed_value_for_platform.rb +3 -3
- data/lib/rubocop/cop/chef/correctness/metadata_malformed_version.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/metadata_missing_name.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/metadata_missing_version.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/node_normal.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/node_save.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/notifies_action_not_symbol.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/octal_mode_as_string.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/powershell_delete_file.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/powershell_file_exists.rb +4 -4
- data/lib/rubocop/cop/chef/correctness/property_without_type.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/resource_sets_internal_properties.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/resource_sets_name_property.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/resource_with_none_action.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/service_resource.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/supports_must_be_float.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/tmp_path.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_shellout.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/chef_sugar_helpers.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_windows_platform_helper.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +3 -3
- data/lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/depends_chef_nginx_cookbook.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/depends_chef_reporting_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/depends_omnibus_updater_cookbook.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/depends_poise.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +3 -3
- data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_sudo_actions.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_actions.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/easy_install.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/epic_fail.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/erl_call.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/execute_path_property.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/execute_relative_creates_without_cwd.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/foodcritic_testing.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/hwrp_without_unified_mode_true.rb +3 -3
- data/lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb +8 -8
- data/lib/rubocop/cop/chef/deprecation/launchd_deprecated_hash_property.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/legacy_notify_syntax.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/legacy_yum_cookbook_recipes.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/librarian_chefspec.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/locale_lc_all_property.rb +3 -3
- data/lib/rubocop/cop/chef/deprecation/log_resource_notifications.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/macos_userdefaults_global_property.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/name_property_and_default.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/node_deep_fetch.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/node_methods_not_attributes.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/node_set.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/node_set_unless.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/node_set_without_level.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/partial_search_class_usage.rb +3 -3
- data/lib/rubocop/cop/chef/deprecation/partial_search_helper_usage.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/poise_archive.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/policyfile_community_source.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/powershell_cookbook_helpers.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/resource_overrides_provides_method.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/resource_uses_dsl_name_method.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/resource_uses_provider_base_method.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/resource_uses_updated_method.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/resource_without_unified_mode_true.rb +3 -3
- data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/run_command_helper.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/search_uses_positional_parameters.rb +8 -10
- data/lib/rubocop/cop/chef/deprecation/use_automatic_resource_name.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/use_inline_resources.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/use_yaml_dump.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/user_supports_property.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/verify_property_file_expansion.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/windows_package_installer_type_string.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/windows_task_change_action.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/windows_version_helpers.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/yum_dnf_compat_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/effortless/chef_vault_used.rb +6 -6
- data/lib/rubocop/cop/chef/effortless/data_bags.rb +1 -1
- data/lib/rubocop/cop/chef/effortless/depends_chef_vault.rb +1 -1
- data/lib/rubocop/cop/chef/effortless/node_environment.rb +2 -2
- data/lib/rubocop/cop/chef/effortless/node_policygroup.rb +1 -1
- data/lib/rubocop/cop/chef/effortless/node_roles.rb +2 -2
- data/lib/rubocop/cop/chef/effortless/search_for_environments_or_roles.rb +1 -1
- data/lib/rubocop/cop/chef/effortless/search_used.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/action_method_in_resource.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/allowed_actions_initializer.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/apt_default_recipe.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/berksfile_source.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/build_essential.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/chef_14_resources.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/chef_15_resources.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/chef_gem_nokogiri.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/class_eval_action_class.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/compile_time_resources.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/conditional_using_test.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/cron_d_file_or_template.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/cron_manage_resource.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/databag_helpers.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/declare_action_class.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/default_action_initializer.rb +5 -5
- data/lib/rubocop/cop/chef/modernize/defines_chefspec_matchers.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_chef_vault_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_chocolatey_cookbooks.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_kernel_module_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_locale_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_openssl_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_timezone_lwrp_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_windows_firewall_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/depends_zypper_cookbook.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/dsl_include_in_resource.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/empty_resource_initialize.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/execute_apt_update.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/execute_sc_exe.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/execute_sleep.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/execute_sysctl.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/execute_tzutil.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/foodcritic_comments.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/if_provides_default_action.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/libarchive_file.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/macos_user_defaults.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/minitest_handler_usage.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/node_init_package.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/node_roles_include.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/ohai_default_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/openssl_rsa_key_resource.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/openssl_x509_resource.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/powershell_expand_archive.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/powershell_guard_interpreter.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/powershell_install_package.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/powershell_install_windowsfeature.rb +6 -6
- data/lib/rubocop/cop/chef/modernize/property_with_name_attribute.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/provides_initializer.rb +4 -4
- data/lib/rubocop/cop/chef/modernize/resource_name_initializer.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/resource_set_or_return.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/resource_with_attributes.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/respond_to_compile_time.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/respond_to_metadata.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/respond_to_provides.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/respond_to_resource_name.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/sc_windows_resource.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/seven_zip_archive.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/shellouts_to_chocolatey.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/simplify_apt_ppa_setup.rb +14 -14
- data/lib/rubocop/cop/chef/modernize/sysctl_param_resource.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/unnecessary_mixlib_shellout_require.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/use_chef_language_cloud_helpers.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/use_chef_language_env_helpers.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/use_chef_language_systemd_helper.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/use_multipackage_installs.rb +3 -3
- data/lib/rubocop/cop/chef/modernize/use_require_relative.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/whyrun_supported_true.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/windows_default_recipe.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/windows_registry_uac.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/windows_zipfile.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/zipfile_resource.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/zypper_repo.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/apt_repository_distribution_default.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/apt_repository_notifies_apt_update.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/attribute_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/conflicts_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/custom_resource_with_allowed_actions.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/double_compile_time.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/grouping_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/long_description_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/multiple_platform_checks.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/name_property_and_required.rb +4 -4
- data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/property_splat_regex.rb +3 -3
- data/lib/rubocop/cop/chef/redundant/property_with_default_and_required.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/provides_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/recipe_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/replaces_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/resource_with_nothing_action.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/sensitive_property_in_resource.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/string_property_with_nil_default.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/suggests_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/unnecessary_desired_state.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/unnecessary_name_property.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/use_create_if_missing.rb +2 -2
- data/lib/rubocop/cop/chef/security/ssh_private_key.rb +1 -1
- data/lib/rubocop/cop/chef/sharing/default_maintainer_metadata.rb +4 -3
- data/lib/rubocop/cop/chef/sharing/empty_metadata_field.rb +2 -2
- data/lib/rubocop/cop/chef/sharing/include_property_descriptions.rb +2 -2
- data/lib/rubocop/cop/chef/sharing/include_resource_descriptions.rb +1 -1
- data/lib/rubocop/cop/chef/sharing/include_resource_examples.rb +1 -1
- data/lib/rubocop/cop/chef/sharing/insecure_cookbook_url.rb +4 -4
- data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +288 -11
- data/lib/rubocop/cop/chef/style/attribute_keys.rb +4 -4
- data/lib/rubocop/cop/chef/style/chef_whaaat.rb +2 -2
- data/lib/rubocop/cop/chef/style/comments_copyright_format.rb +2 -2
- data/lib/rubocop/cop/chef/style/comments_default_copyright.rb +2 -2
- data/lib/rubocop/cop/chef/style/comments_format.rb +2 -2
- data/lib/rubocop/cop/chef/style/file_mode.rb +2 -2
- data/lib/rubocop/cop/chef/style/immediate_notification_timing.rb +2 -2
- data/lib/rubocop/cop/chef/style/include_recipe_with_parentheses.rb +2 -2
- data/lib/rubocop/cop/chef/style/negating_only_if.rb +2 -2
- data/lib/rubocop/cop/chef/style/overly_complex_supports_depends_metadata.rb +2 -2
- data/lib/rubocop/cop/chef/style/simplify_platform_major_version_check.rb +4 -4
- data/lib/rubocop/cop/chef/style/true_false_resource_properties.rb +2 -2
- data/lib/rubocop/cop/chef/style/unnecessary_os_check.rb +5 -5
- data/lib/rubocop/cop/chef/style/unnecessary_platform_case_statement.rb +2 -2
- data/lib/rubocop/cop/chef/style/use_platform_helpers.rb +3 -3
- data/lib/rubocop/cop/inspec/deprecation/attribute_default.rb +2 -2
- data/lib/rubocop/cop/inspec/deprecation/attribute_helper.rb +2 -2
- metadata +6 -10
data/config/cookstyle.yml
CHANGED
|
@@ -43,7 +43,7 @@ Chef/Style:
|
|
|
43
43
|
- '**/.delivery/config.json'
|
|
44
44
|
|
|
45
45
|
Chef/Style/AttributeKeys:
|
|
46
|
-
Description:
|
|
46
|
+
Description: Enforce consistent use of either string or symbol keys when accessing node attributes (e.g., `node['foo']` vs `node[:foo]`).
|
|
47
47
|
StyleGuide: 'chef_style_attributekeys'
|
|
48
48
|
Enabled: true
|
|
49
49
|
EnforcedStyle: strings
|
|
@@ -55,7 +55,7 @@ Chef/Style/AttributeKeys:
|
|
|
55
55
|
- '**/metadata.rb'
|
|
56
56
|
|
|
57
57
|
Chef/Style/CopyrightCommentFormat:
|
|
58
|
-
Description:
|
|
58
|
+
Description: Ensure copyright dates in comment blocks follow a consistent format and are up to date.
|
|
59
59
|
StyleGuide: 'chef_style_copyrightcommentformat'
|
|
60
60
|
Enabled: false
|
|
61
61
|
VersionAdded: '5.0.0'
|
|
@@ -67,7 +67,7 @@ Chef/Style/CommentSentenceSpacing:
|
|
|
67
67
|
VersionAdded: '5.1.0'
|
|
68
68
|
|
|
69
69
|
Chef/Style/CommentFormat:
|
|
70
|
-
Description:
|
|
70
|
+
Description: 'Ensure comment headers in cookbooks follow the standard Chef comment format (e.g., # Cookbook:: name style headers).'
|
|
71
71
|
StyleGuide: 'chef_style_commentformat'
|
|
72
72
|
Enabled: true
|
|
73
73
|
VersionAdded: '5.0.0'
|
|
@@ -85,7 +85,7 @@ Chef/Style/FileMode:
|
|
|
85
85
|
- '**/Berksfile'
|
|
86
86
|
|
|
87
87
|
Chef/Style/UsePlatformHelpers:
|
|
88
|
-
Description: Use platform
|
|
88
|
+
Description: Use the `platform?` and `platform_family?` helpers instead of comparing `node['platform']` or `node['platform_family']` directly. The helpers are easier to read and can accept multiple arguments.
|
|
89
89
|
StyleGuide: 'chef_style_useplatformhelpers'
|
|
90
90
|
Enabled: true
|
|
91
91
|
VersionAdded: '5.6.0'
|
|
@@ -95,7 +95,7 @@ Chef/Style/UsePlatformHelpers:
|
|
|
95
95
|
- '**/Berksfile'
|
|
96
96
|
|
|
97
97
|
Chef/Style/SimplifyPlatformMajorVersionCheck:
|
|
98
|
-
Description:
|
|
98
|
+
Description: "When checking the major version of a platform, use `node['platform_version'].to_i` instead of splitting the version string. It's simpler and easier to read."
|
|
99
99
|
StyleGuide: 'chef_style_simplifyplatformmajorversioncheck'
|
|
100
100
|
Enabled: true
|
|
101
101
|
VersionAdded: '5.8.0'
|
|
@@ -104,13 +104,13 @@ Chef/Style/SimplifyPlatformMajorVersionCheck:
|
|
|
104
104
|
- '**/Berksfile'
|
|
105
105
|
|
|
106
106
|
Chef/Style/DefaultCopyrightComments:
|
|
107
|
-
Description: Cookbook copyright comment headers should
|
|
107
|
+
Description: Cookbook copyright comment headers should list a real person or organization, not the default placeholder text from the cookbook generator.
|
|
108
108
|
StyleGuide: 'chef_style_defaultcopyrightcomments'
|
|
109
109
|
Enabled: true
|
|
110
110
|
VersionAdded: '5.12.0'
|
|
111
111
|
|
|
112
112
|
Chef/Style/UnnecessaryPlatformCaseStatement:
|
|
113
|
-
Description: Use the platform
|
|
113
|
+
Description: Use the `platform?` and `platform_family?` helpers instead of a `case` statement that only includes a single `when`. A simple if/unless with the helper is easier to read.
|
|
114
114
|
StyleGuide: 'chef_style_unnecessaryplatformcasestatement'
|
|
115
115
|
Enabled: true
|
|
116
116
|
VersionAdded: '5.16.0'
|
|
@@ -119,7 +119,7 @@ Chef/Style/UnnecessaryPlatformCaseStatement:
|
|
|
119
119
|
- '**/Berksfile'
|
|
120
120
|
|
|
121
121
|
Chef/Style/ImmediateNotificationTiming:
|
|
122
|
-
Description: Use
|
|
122
|
+
Description: Use `:immediately` instead of `:immediate` when setting resource notification timing. Both work, but `:immediately` is the preferred form.
|
|
123
123
|
StyleGuide: 'chef_style_immediatenotificationtiming'
|
|
124
124
|
Enabled: true
|
|
125
125
|
VersionAdded: '5.16.0'
|
|
@@ -138,7 +138,7 @@ Chef/Style/TrueClassFalseClassResourceProperties:
|
|
|
138
138
|
- '**/resources/*.rb'
|
|
139
139
|
|
|
140
140
|
Chef/Style/OverlyComplexSupportsDependsMetadata:
|
|
141
|
-
Description: Don't loop over an array to set cookbook dependencies or supported platforms
|
|
141
|
+
Description: Don't loop over an array to set cookbook dependencies or supported platforms when you have fewer than three values. Just list them individually for clarity.
|
|
142
142
|
StyleGuide: 'chef_style_overcomplexsupportsdependsmetadata'
|
|
143
143
|
Enabled: true
|
|
144
144
|
VersionAdded: '5.19.0'
|
|
@@ -146,13 +146,13 @@ Chef/Style/OverlyComplexSupportsDependsMetadata:
|
|
|
146
146
|
- '**/metadata.rb'
|
|
147
147
|
|
|
148
148
|
Chef/Style/ChefWhaaat:
|
|
149
|
-
Description:
|
|
149
|
+
Description: "References to 'Chef' alone are ambiguous. Specify the product name instead (e.g., Chef Infra Client, Chef InSpec, Chef Habitat)."
|
|
150
150
|
StyleGuide: 'chef_style_chefwhaaat'
|
|
151
151
|
Enabled: false
|
|
152
152
|
VersionAdded: '5.20.0'
|
|
153
153
|
|
|
154
154
|
Chef/Style/UnnecessaryOSCheck:
|
|
155
|
-
Description: Use the platform_family
|
|
155
|
+
Description: "Use the `platform_family?` helper instead of checking `node['os']` directly for platform families that match 1:1 with OS values. The helper is easier to read and can accept multiple arguments, which simplifies complex platform logic."
|
|
156
156
|
StyleGuide: 'chef_style_unnecessaryoscheck'
|
|
157
157
|
Enabled: true
|
|
158
158
|
VersionAdded: '5.21.0'
|
|
@@ -161,7 +161,7 @@ Chef/Style/UnnecessaryOSCheck:
|
|
|
161
161
|
- '**/Berksfile'
|
|
162
162
|
|
|
163
163
|
Chef/Style/NegatingOnlyIf:
|
|
164
|
-
Description: Use not_if instead of only_if
|
|
164
|
+
Description: "Use `not_if` guards instead of negating the condition inside `only_if` with `!`. For example, write `not_if { foo? }` instead of `only_if { !foo? }`."
|
|
165
165
|
StyleGuide: 'chef_style_negatingonlyif'
|
|
166
166
|
VersionAdded: '6.2.0'
|
|
167
167
|
Enabled: true
|
|
@@ -170,7 +170,7 @@ Chef/Style/NegatingOnlyIf:
|
|
|
170
170
|
- '**/Berksfile'
|
|
171
171
|
|
|
172
172
|
Chef/Style/IncludeRecipeWithParentheses:
|
|
173
|
-
Description: There is no need to wrap the recipe in parentheses when using
|
|
173
|
+
Description: "There is no need to wrap the recipe name in parentheses when using `include_recipe`. Write `include_recipe 'foo'` instead of `include_recipe('foo')`."
|
|
174
174
|
StyleGuide: 'chef_style_includerecipewithparentheses'
|
|
175
175
|
VersionAdded: '6.11.0'
|
|
176
176
|
Enabled: true
|
|
@@ -188,7 +188,7 @@ Chef/Correctness:
|
|
|
188
188
|
StyleGuideBaseURL: https://docs.chef.io/workstation/cookstyle/
|
|
189
189
|
|
|
190
190
|
Chef/Correctness/ServiceResource:
|
|
191
|
-
Description: Use
|
|
191
|
+
Description: Use the `service` resource to start and stop services instead of shelling out with `execute` or `bash` resources. The `service` resource is idempotent and handles platform differences automatically.
|
|
192
192
|
StyleGuide: 'chef_correctness_serviceresource'
|
|
193
193
|
Enabled: true
|
|
194
194
|
VersionAdded: '5.0.0'
|
|
@@ -198,7 +198,7 @@ Chef/Correctness/ServiceResource:
|
|
|
198
198
|
- '**/Berksfile'
|
|
199
199
|
|
|
200
200
|
Chef/Correctness/NodeNormal:
|
|
201
|
-
Description:
|
|
201
|
+
Description: Avoid using `node.normal` to set attributes. Normal attributes persist on the Chef Infra Server between runs and can cause unexpected behavior. Use `node.default` or `node.override` instead.
|
|
202
202
|
StyleGuide: 'chef_correctness_nodenormal'
|
|
203
203
|
Enabled: true
|
|
204
204
|
VersionAdded: '5.1.0'
|
|
@@ -207,7 +207,7 @@ Chef/Correctness/NodeNormal:
|
|
|
207
207
|
- '**/Berksfile'
|
|
208
208
|
|
|
209
209
|
Chef/Correctness/NodeNormalUnless:
|
|
210
|
-
Description:
|
|
210
|
+
Description: Avoid using `node.normal_unless` to set attributes. Normal attributes persist on the Chef Infra Server between runs and can cause unexpected behavior. Use `node.default_unless` or `node.override_unless` instead.
|
|
211
211
|
StyleGuide: 'chef_correctness_nodenormalunless'
|
|
212
212
|
Enabled: true
|
|
213
213
|
VersionAdded: '5.1.0'
|
|
@@ -216,7 +216,7 @@ Chef/Correctness/NodeNormalUnless:
|
|
|
216
216
|
- '**/Berksfile'
|
|
217
217
|
|
|
218
218
|
Chef/Correctness/TmpPath:
|
|
219
|
-
Description: Use file_cache_path
|
|
219
|
+
Description: "Use Chef's `file_cache_path` helper instead of hard-coding temporary directory paths like `/tmp` or `C:\\temp`. The helper returns the correct cache directory for each platform."
|
|
220
220
|
StyleGuide: 'chef_correctness_tmppath'
|
|
221
221
|
Enabled: true
|
|
222
222
|
VersionAdded: '5.0.0'
|
|
@@ -225,7 +225,7 @@ Chef/Correctness/TmpPath:
|
|
|
225
225
|
- '**/Berksfile'
|
|
226
226
|
|
|
227
227
|
Chef/Correctness/InvalidPlatformMetadata:
|
|
228
|
-
Description: metadata.rb
|
|
228
|
+
Description: The platform name passed to the `supports` method in metadata.rb is not a valid Chef platform. Check for typos or consult the Chef documentation for valid platform names.
|
|
229
229
|
StyleGuide: 'chef_correctness_invalidplatformmetadata'
|
|
230
230
|
Enabled: true
|
|
231
231
|
VersionAdded: '5.2.0'
|
|
@@ -242,7 +242,7 @@ Chef/Correctness/CookbookUsesNodeSave:
|
|
|
242
242
|
- '**/Berksfile'
|
|
243
243
|
|
|
244
244
|
Chef/Correctness/MetadataMissingName:
|
|
245
|
-
Description: The metadata.rb file is missing the name
|
|
245
|
+
Description: The metadata.rb file is missing the `name` method which is required by Chef Infra Client 12 and later. Add a `name` call to your metadata.rb to avoid failures.
|
|
246
246
|
StyleGuide: 'chef_correctness_metadatamissingname'
|
|
247
247
|
Enabled: true
|
|
248
248
|
VersionAdded: '5.2.0'
|
|
@@ -260,7 +260,7 @@ Chef/Correctness/BlockGuardWithOnlyString:
|
|
|
260
260
|
- '**/Berksfile'
|
|
261
261
|
|
|
262
262
|
Chef/Correctness/ResourceSetsInternalProperties:
|
|
263
|
-
Description: Do not set properties used internally by Chef Infra Client to track
|
|
263
|
+
Description: Do not manually set properties used internally by Chef Infra Client to track system state. Setting these directly can cause unexpected behavior during the Chef run.
|
|
264
264
|
StyleGuide: 'chef_correctness_resourcesetsinternalproperties'
|
|
265
265
|
Enabled: true
|
|
266
266
|
VersionAdded: '5.5.0'
|
|
@@ -270,7 +270,7 @@ Chef/Correctness/ResourceSetsInternalProperties:
|
|
|
270
270
|
- '**/Berksfile'
|
|
271
271
|
|
|
272
272
|
Chef/Correctness/ResourceSetsNameProperty:
|
|
273
|
-
Description:
|
|
273
|
+
Description: Use the `name_property` option on a resource property instead of directly setting a property called `:name`. The `name_property` option automatically maps the resource block name to that property.
|
|
274
274
|
StyleGuide: 'chef_correctness_resourcesetsnameproperty'
|
|
275
275
|
Enabled: true
|
|
276
276
|
VersionAdded: '5.5.0'
|
|
@@ -280,7 +280,7 @@ Chef/Correctness/ResourceSetsNameProperty:
|
|
|
280
280
|
- '**/Berksfile'
|
|
281
281
|
|
|
282
282
|
Chef/Correctness/ResourceWithNoneAction:
|
|
283
|
-
Description: Resource uses the nonexistent
|
|
283
|
+
Description: "Resource uses the nonexistent `:none` action instead of the correct `:nothing` action. Use `:nothing` to prevent a resource from running unless notified by another resource."
|
|
284
284
|
StyleGuide: 'chef_correctness_resourcewithnoneaction'
|
|
285
285
|
Enabled: true
|
|
286
286
|
VersionAdded: '5.5.0'
|
|
@@ -298,7 +298,7 @@ Chef/Correctness/InvalidVersionMetadata:
|
|
|
298
298
|
- '**/metadata.rb'
|
|
299
299
|
|
|
300
300
|
Chef/Correctness/NotifiesActionNotSymbol:
|
|
301
|
-
Description: When
|
|
301
|
+
Description: "When using `notifies` or `subscribes` in a resource the action should always be a symbol (e.g., `:restart`) not a string. Using a string may cause double notifications in Chef Infra Client versions before 14.0."
|
|
302
302
|
StyleGuide: 'chef_correctness_notifiesactionnotsymbol'
|
|
303
303
|
Enabled: true
|
|
304
304
|
VersionAdded: '5.10.0'
|
|
@@ -308,7 +308,7 @@ Chef/Correctness/NotifiesActionNotSymbol:
|
|
|
308
308
|
- '**/Berksfile'
|
|
309
309
|
|
|
310
310
|
Chef/Correctness/IncorrectLibraryInjection:
|
|
311
|
-
Description: Libraries should be injected into
|
|
311
|
+
Description: Libraries should be injected into `Chef::DSL::Recipe` or `Chef::DSL::Resource` and not directly into `Chef::Recipe`, `Chef::Resource`, or `Chef::Provider`. Injecting into the DSL classes ensures your helpers are available everywhere they are needed.
|
|
312
312
|
StyleGuide: 'chef_correctness_incorrectlibraryinjection'
|
|
313
313
|
Enabled: true
|
|
314
314
|
VersionAdded: '5.10.0'
|
|
@@ -317,7 +317,7 @@ Chef/Correctness/IncorrectLibraryInjection:
|
|
|
317
317
|
- '**/Berksfile'
|
|
318
318
|
|
|
319
319
|
Chef/Correctness/InvalidPlatformHelper:
|
|
320
|
-
Description: Pass valid
|
|
320
|
+
Description: Pass valid platform names to the `platform?` helper. Check for typos in platform names to make sure the condition works as intended.
|
|
321
321
|
StyleGuide: 'chef_correctness_invalidplatformhelper'
|
|
322
322
|
Enabled: true
|
|
323
323
|
VersionAdded: '5.15.0'
|
|
@@ -326,7 +326,7 @@ Chef/Correctness/InvalidPlatformHelper:
|
|
|
326
326
|
- '**/Berksfile'
|
|
327
327
|
|
|
328
328
|
Chef/Correctness/InvalidPlatformFamilyHelper:
|
|
329
|
-
Description: Pass valid platform
|
|
329
|
+
Description: Pass valid platform family names to the `platform_family?` helper. Check for typos in platform family names to make sure the condition works as intended.
|
|
330
330
|
StyleGuide: 'chef_correctness_invalidplatformfamilyhelper'
|
|
331
331
|
Enabled: true
|
|
332
332
|
VersionAdded: '5.15.0'
|
|
@@ -335,7 +335,7 @@ Chef/Correctness/InvalidPlatformFamilyHelper:
|
|
|
335
335
|
- '**/Berksfile'
|
|
336
336
|
|
|
337
337
|
Chef/Correctness/ScopedFileExist:
|
|
338
|
-
Description:
|
|
338
|
+
Description: "Use `::File.exist?` instead of `File.exist?` in recipes and resources. Without the leading `::`, Ruby may resolve `File` to `Chef::Resource::File` instead of Ruby's built-in `File` class, leading to errors."
|
|
339
339
|
StyleGuide: 'chef_correctness_scopedfileexist'
|
|
340
340
|
Enabled: true
|
|
341
341
|
VersionAdded: '5.15.0'
|
|
@@ -345,7 +345,7 @@ Chef/Correctness/ScopedFileExist:
|
|
|
345
345
|
- '**/Berksfile'
|
|
346
346
|
|
|
347
347
|
Chef/Correctness/InvalidPlatformValueForPlatformFamilyHelper:
|
|
348
|
-
Description: Pass valid
|
|
348
|
+
Description: Pass valid platform family names to the `value_for_platform_family` helper. Check for typos to make sure the values are matched correctly.
|
|
349
349
|
StyleGuide: 'chef_correctness_invalidplatformvalueforplatformfamilyhelper'
|
|
350
350
|
Enabled: true
|
|
351
351
|
VersionAdded: '5.15.0'
|
|
@@ -354,7 +354,7 @@ Chef/Correctness/InvalidPlatformValueForPlatformFamilyHelper:
|
|
|
354
354
|
- '**/Berksfile'
|
|
355
355
|
|
|
356
356
|
Chef/Correctness/InvalidPlatformValueForPlatformHelper:
|
|
357
|
-
Description: Pass valid
|
|
357
|
+
Description: Pass valid platform names to the `value_for_platform` helper. Check for typos to make sure values are matched correctly.
|
|
358
358
|
StyleGuide: 'chef_correctness_invalidplatformvalueforplatformhelper'
|
|
359
359
|
Enabled: true
|
|
360
360
|
VersionAdded: '5.15.0'
|
|
@@ -363,7 +363,7 @@ Chef/Correctness/InvalidPlatformValueForPlatformHelper:
|
|
|
363
363
|
- '**/Berksfile'
|
|
364
364
|
|
|
365
365
|
Chef/Correctness/InvalidNotificationTiming:
|
|
366
|
-
Description:
|
|
366
|
+
Description: "An invalid notification timing was used. Valid timings are `:immediately`, `:immediate` (alias for `:immediately`), `:delayed`, and `:before`."
|
|
367
367
|
StyleGuide: 'chef_correctness_invalidnotificationtiming'
|
|
368
368
|
Enabled: true
|
|
369
369
|
VersionAdded: '5.16.0'
|
|
@@ -373,7 +373,7 @@ Chef/Correctness/InvalidNotificationTiming:
|
|
|
373
373
|
- '**/Berksfile'
|
|
374
374
|
|
|
375
375
|
Chef/Correctness/MalformedPlatformValueForPlatformHelper:
|
|
376
|
-
Description:
|
|
376
|
+
Description: "The `value_for_platform` helper requires a properly structured hash: each platform maps to a hash of version/value pairs. Use the 'default' key for a fallback value when you don't need to match a specific version."
|
|
377
377
|
StyleGuide: 'chef_correctness_malformedplatformvalueforplatformhelper'
|
|
378
378
|
Enabled: true
|
|
379
379
|
VersionAdded: '5.16.0'
|
|
@@ -382,7 +382,7 @@ Chef/Correctness/MalformedPlatformValueForPlatformHelper:
|
|
|
382
382
|
- '**/Berksfile'
|
|
383
383
|
|
|
384
384
|
Chef/Correctness/DnfPackageAllowDowngrades:
|
|
385
|
-
Description: dnf_package does not support the allow_downgrades property
|
|
385
|
+
Description: The `dnf_package` resource does not support the `allow_downgrades` property. DNF handles package version management differently than yum.
|
|
386
386
|
StyleGuide: 'chef_correctness_dnfpackageallowdowngrades'
|
|
387
387
|
Enabled: true
|
|
388
388
|
VersionAdded: '5.16.0'
|
|
@@ -392,7 +392,7 @@ Chef/Correctness/DnfPackageAllowDowngrades:
|
|
|
392
392
|
- '**/Berksfile'
|
|
393
393
|
|
|
394
394
|
Chef/Correctness/EmptyResourceGuard:
|
|
395
|
-
Description: Resource guards (not_if
|
|
395
|
+
Description: "Resource guards (`not_if`/`only_if`) should not be empty strings. In Ruby, empty strings are 'truthy', so an empty guard string will always pass, which is almost certainly not what you intended."
|
|
396
396
|
StyleGuide: 'chef_correctness_emptyresourceguard'
|
|
397
397
|
Enabled: true
|
|
398
398
|
VersionAdded: '8.4.0'
|
|
@@ -402,7 +402,7 @@ Chef/Correctness/EmptyResourceGuard:
|
|
|
402
402
|
- '**/Berksfile'
|
|
403
403
|
|
|
404
404
|
Chef/Correctness/ChefApplicationFatal:
|
|
405
|
-
Description: Use raise to force Chef Infra Client to fail instead of
|
|
405
|
+
Description: Use `raise` to force Chef Infra Client to fail instead of `Chef::Application.fatal`, which can cause the entire application to exit without proper error handling or reporting.
|
|
406
406
|
StyleGuide: 'chef_correctness_chefapplicationfatal'
|
|
407
407
|
Enabled: true
|
|
408
408
|
VersionAdded: '6.0.0'
|
|
@@ -421,7 +421,7 @@ Chef/Correctness/PowershellScriptDeleteFile:
|
|
|
421
421
|
- '**/Berksfile'
|
|
422
422
|
|
|
423
423
|
Chef/Correctness/ConditionalRubyShellout:
|
|
424
|
-
Description: Don't use Ruby
|
|
424
|
+
Description: "Don't use Ruby shell_out in `only_if`/`not_if` guards when you can pass the command as a string directly. For example, use `not_if 'test -f /tmp/foo'` instead of `not_if { shell_out('test -f /tmp/foo').exitstatus == 0 }`."
|
|
425
425
|
StyleGuide: 'chef_correctness_conditionalrubyshellout'
|
|
426
426
|
Enabled: true
|
|
427
427
|
VersionAdded: '6.1.0'
|
|
@@ -440,7 +440,7 @@ Chef/Correctness/LazyEvalNodeAttributeDefaults:
|
|
|
440
440
|
- '**/resources/*.rb'
|
|
441
441
|
|
|
442
442
|
Chef/Correctness/OpenSSLPasswordHelpers:
|
|
443
|
-
Description:
|
|
443
|
+
Description: "Do not use the `secure_password` helper from the openssl cookbook's `Opscode::OpenSSL::Password` class, as the passwords it generates are not truly secure. Use Chef Vault, encrypted data bags, or an external secrets manager instead."
|
|
444
444
|
StyleGuide: 'chef_correctness_opensslpasswordhelpers'
|
|
445
445
|
Enabled: true
|
|
446
446
|
VersionAdded: '6.6.0'
|
|
@@ -449,7 +449,7 @@ Chef/Correctness/OpenSSLPasswordHelpers:
|
|
|
449
449
|
- '**/Berksfile'
|
|
450
450
|
|
|
451
451
|
Chef/Correctness/InvalidPlatformFamilyInCase:
|
|
452
|
-
Description: Use valid platform family
|
|
452
|
+
Description: Use valid platform family names in `case` statements. Check for typos to make sure your platform-specific code runs on the intended systems.
|
|
453
453
|
StyleGuide: 'chef_correctness_invalidplatformfamilyincase'
|
|
454
454
|
Enabled: true
|
|
455
455
|
VersionAdded: '6.6.0'
|
|
@@ -458,7 +458,7 @@ Chef/Correctness/InvalidPlatformFamilyInCase:
|
|
|
458
458
|
- '**/Berksfile'
|
|
459
459
|
|
|
460
460
|
Chef/Correctness/InvalidPlatformInCase:
|
|
461
|
-
Description: Use valid platform
|
|
461
|
+
Description: Use valid platform names in `case` statements. Check for typos to make sure your platform-specific code runs on the intended systems.
|
|
462
462
|
StyleGuide: 'chef_correctness_invalidplatformincase'
|
|
463
463
|
Enabled: true
|
|
464
464
|
VersionAdded: '6.6.0'
|
|
@@ -467,7 +467,7 @@ Chef/Correctness/InvalidPlatformInCase:
|
|
|
467
467
|
- '**/Berksfile'
|
|
468
468
|
|
|
469
469
|
Chef/Correctness/InvalidDefaultAction:
|
|
470
|
-
Description: Default actions in resources should be a symbol or an array of symbols.
|
|
470
|
+
Description: "Default actions in resources should be a symbol or an array of symbols (e.g., `default_action :create` or `default_action [:create, :enable]`)."
|
|
471
471
|
StyleGuide: 'chef_correctness_invaliddefaultaction'
|
|
472
472
|
Enabled: true
|
|
473
473
|
VersionAdded: '6.13.0'
|
|
@@ -476,7 +476,7 @@ Chef/Correctness/InvalidDefaultAction:
|
|
|
476
476
|
- '**/resources/*.rb'
|
|
477
477
|
|
|
478
478
|
Chef/Correctness/SupportsMustBeFloat:
|
|
479
|
-
Description:
|
|
479
|
+
Description: "Platform versions in metadata.rb `supports` calls should be floats not integers (e.g., `supports 'redhat', '>= 7.0'` not `supports 'redhat', '>= 7'`). Using an integer may not match versions correctly."
|
|
480
480
|
StyleGuide: 'chef_correctness_supportsmustbefloat'
|
|
481
481
|
Enabled: true
|
|
482
482
|
VersionAdded: '6.13.0'
|
|
@@ -511,7 +511,7 @@ Chef/Correctness/PropertyWithoutType:
|
|
|
511
511
|
- '**/resources/*.rb'
|
|
512
512
|
|
|
513
513
|
Chef/Correctness/OctalModeAsString:
|
|
514
|
-
Description: Don't represent file modes as strings
|
|
514
|
+
Description: "Don't represent file modes as octal strings like '0755'. Use standard base 10 string values like '755' instead to avoid confusion between octal and decimal formats."
|
|
515
515
|
StyleGuide: 'chef_correctness_octalmodeasstring'
|
|
516
516
|
Enabled: true
|
|
517
517
|
VersionAdded: '6.21.0'
|
|
@@ -521,7 +521,7 @@ Chef/Correctness/OctalModeAsString:
|
|
|
521
521
|
- '**/Berksfile'
|
|
522
522
|
|
|
523
523
|
Chef/Correctness/MetadataMalformedDepends:
|
|
524
|
-
Description: metadata.rb cookbook
|
|
524
|
+
Description: "In metadata.rb, the cookbook name and version constraint in `depends` calls must be separated by a comma (e.g., `depends 'apt', '>= 7.0'`)."
|
|
525
525
|
StyleGuide: 'chef_correctness_metadatamalformeddepends'
|
|
526
526
|
Enabled: true
|
|
527
527
|
VersionAdded: '7.16'
|
|
@@ -538,7 +538,7 @@ Chef/Correctness/PowershellFileExists:
|
|
|
538
538
|
- '**/Berksfile'
|
|
539
539
|
|
|
540
540
|
Chef/Correctness/MetadataMissingVersion:
|
|
541
|
-
Description: metadata.rb should define a version for the cookbook.
|
|
541
|
+
Description: "The metadata.rb file should define a `version` for the cookbook (e.g., `version '1.0.0'`). Without an explicit version, the cookbook will default to version 0.0.0."
|
|
542
542
|
StyleGuide: 'chef_correctness_metadatamissingversion'
|
|
543
543
|
Enabled: true
|
|
544
544
|
VersionAdded: '7.25'
|
|
@@ -554,7 +554,7 @@ Chef/Correctness/InvalidCookbookName:
|
|
|
554
554
|
- '**/metadata.rb'
|
|
555
555
|
|
|
556
556
|
Chef/Correctness/InvalidNotificationResource:
|
|
557
|
-
Description: The resource to notify when calling `notifies` or `subscribes` must be a string.
|
|
557
|
+
Description: "The resource to notify when calling `notifies` or `subscribes` must be a string (e.g., `notifies :restart, 'service[apache2]'`), not a symbol or other type."
|
|
558
558
|
StyleGuide: 'chef_correctness_invalidnotificationresource'
|
|
559
559
|
Enabled: true
|
|
560
560
|
VersionAdded: '7.28'
|
|
@@ -572,7 +572,7 @@ Chef/Sharing:
|
|
|
572
572
|
StyleGuideBaseURL: https://docs.chef.io/workstation/cookstyle/
|
|
573
573
|
|
|
574
574
|
Chef/Sharing/InsecureCookbookURL:
|
|
575
|
-
Description:
|
|
575
|
+
Description: Use HTTPS instead of HTTP for GitHub or GitLab URLs in the `source_url` and `issues_url` fields of metadata.rb to ensure secure connections.
|
|
576
576
|
StyleGuide: 'chef_sharing_insecurecookbookurl'
|
|
577
577
|
Enabled: true
|
|
578
578
|
VersionAdded: '5.1.0'
|
|
@@ -581,7 +581,7 @@ Chef/Sharing/InsecureCookbookURL:
|
|
|
581
581
|
- '**/metadata.rb'
|
|
582
582
|
|
|
583
583
|
Chef/Sharing/InvalidLicenseString:
|
|
584
|
-
Description:
|
|
584
|
+
Description: "The `license` field in metadata.rb should use a valid SPDX license identifier (e.g., 'Apache-2.0', 'MIT') or 'all rights reserved'. See https://spdx.org/licenses/ for the full list."
|
|
585
585
|
StyleGuide: 'chef_sharing_invalidlicensestring'
|
|
586
586
|
Enabled: true
|
|
587
587
|
VersionAdded: '5.2.0'
|
|
@@ -608,7 +608,7 @@ Chef/Sharing/EmptyMetadataField:
|
|
|
608
608
|
- '**/metadata.rb'
|
|
609
609
|
|
|
610
610
|
Chef/Sharing/IncludePropertyDescriptions:
|
|
611
|
-
Description:
|
|
611
|
+
Description: Resource properties should include a `description` field so that automated documentation tools can generate helpful documentation for your custom resources. Requires Chef Infra Client 13.9 or later.
|
|
612
612
|
StyleGuide: 'chef_sharing_includepropertydescriptions'
|
|
613
613
|
Enabled: false
|
|
614
614
|
VersionAdded: '6.1.0'
|
|
@@ -617,7 +617,7 @@ Chef/Sharing/IncludePropertyDescriptions:
|
|
|
617
617
|
- '**/resources/*.rb'
|
|
618
618
|
|
|
619
619
|
Chef/Sharing/IncludeResourceDescriptions:
|
|
620
|
-
Description:
|
|
620
|
+
Description: Custom resources should include a `description` field at the top of the resource so that automated documentation tools can describe the resource. Requires Chef Infra Client 13.9 or later.
|
|
621
621
|
StyleGuide: 'chef_sharing_includeresourcedescriptions'
|
|
622
622
|
Enabled: false
|
|
623
623
|
VersionAdded: '6.1.0'
|
|
@@ -625,7 +625,7 @@ Chef/Sharing/IncludeResourceDescriptions:
|
|
|
625
625
|
- '**/resources/*.rb'
|
|
626
626
|
|
|
627
627
|
Chef/Sharing/IncludeResourceExamples:
|
|
628
|
-
Description:
|
|
628
|
+
Description: Custom resources should include an `examples` field with usage examples so that automated documentation tools can show users how to use the resource. Requires Chef Infra Client 13.9 or later.
|
|
629
629
|
StyleGuide: 'chef_sharing_includeresourceexamples'
|
|
630
630
|
Enabled: false
|
|
631
631
|
VersionAdded: '6.10.0'
|
|
@@ -641,7 +641,7 @@ Chef/Deprecations:
|
|
|
641
641
|
StyleGuideBaseURL: https://docs.chef.io/workstation/cookstyle/
|
|
642
642
|
|
|
643
643
|
Chef/Deprecations/NodeDeepFetch:
|
|
644
|
-
Description: Do not use the deprecated chef-sugar node.
|
|
644
|
+
Description: "Do not use the `node.deep_fetch` method from the deprecated chef-sugar gem. Use `node.read` or `node.dig` to safely access deeply nested node attributes instead."
|
|
645
645
|
StyleGuide: 'chef_deprecations_nodedeepfetch'
|
|
646
646
|
Enabled: true
|
|
647
647
|
VersionAdded: '5.12.0'
|
|
@@ -650,7 +650,7 @@ Chef/Deprecations/NodeDeepFetch:
|
|
|
650
650
|
- '**/Berksfile'
|
|
651
651
|
|
|
652
652
|
Chef/Deprecations/NodeSet:
|
|
653
|
-
Description: Do not use
|
|
653
|
+
Description: "Do not use `node.set`, which was removed in Chef Infra Client 14. Use `node.default` or `node.override` to set node attributes instead."
|
|
654
654
|
StyleGuide: 'chef_deprecations_nodeset'
|
|
655
655
|
Enabled: true
|
|
656
656
|
VersionAdded: '5.0.0'
|
|
@@ -659,7 +659,7 @@ Chef/Deprecations/NodeSet:
|
|
|
659
659
|
- '**/Berksfile'
|
|
660
660
|
|
|
661
661
|
Chef/Deprecations/NodeSetUnless:
|
|
662
|
-
Description: Do not use
|
|
662
|
+
Description: "Do not use `node.set_unless`, which was removed in Chef Infra Client 14. Use `node.default_unless` or `node.override_unless` instead."
|
|
663
663
|
StyleGuide: 'chef_deprecations_nodesetunless'
|
|
664
664
|
Enabled: true
|
|
665
665
|
VersionAdded: '5.1.0'
|
|
@@ -678,7 +678,7 @@ Chef/Deprecations/EpicFail:
|
|
|
678
678
|
- '**/Berksfile'
|
|
679
679
|
|
|
680
680
|
Chef/Deprecations/CookbookDependsOnPoise:
|
|
681
|
-
Description: Cookbooks should not depend on the deprecated Poise framework
|
|
681
|
+
Description: Cookbooks should not depend on the deprecated Poise framework cookbooks. Poise is no longer maintained and may not work with newer Chef Infra Client releases.
|
|
682
682
|
StyleGuide: 'chef_deprecations_cookbookdependsonpoise'
|
|
683
683
|
Enabled: true
|
|
684
684
|
VersionAdded: '5.1.0'
|
|
@@ -686,7 +686,7 @@ Chef/Deprecations/CookbookDependsOnPoise:
|
|
|
686
686
|
- '**/metadata.rb'
|
|
687
687
|
|
|
688
688
|
Chef/Deprecations/CookbookDependsOnCompatResource:
|
|
689
|
-
Description: Don't depend on the
|
|
689
|
+
Description: "Don't depend on the `compat_resource` cookbook, which is no longer needed with Chef Infra Client 12.19 and later. The functionality it provided is now built into Chef Infra Client."
|
|
690
690
|
StyleGuide: 'chef_deprecations_cookbookdependsoncompatresource'
|
|
691
691
|
Enabled: true
|
|
692
692
|
VersionAdded: '5.1.0'
|
|
@@ -694,7 +694,7 @@ Chef/Deprecations/CookbookDependsOnCompatResource:
|
|
|
694
694
|
- '**/metadata.rb'
|
|
695
695
|
|
|
696
696
|
Chef/Deprecations/CookbookDependsOnPartialSearch:
|
|
697
|
-
Description: Don't depend on the
|
|
697
|
+
Description: "Don't depend on the `partial_search` cookbook, which is no longer needed with Chef Infra Client 13 and later. Use the `:filter_result` option in the built-in `search` helper instead."
|
|
698
698
|
StyleGuide: 'chef_deprecations_cookbookdependsonpartialsearch'
|
|
699
699
|
Enabled: true
|
|
700
700
|
VersionAdded: '5.1.0'
|
|
@@ -702,7 +702,7 @@ Chef/Deprecations/CookbookDependsOnPartialSearch:
|
|
|
702
702
|
- '**/metadata.rb'
|
|
703
703
|
|
|
704
704
|
Chef/Deprecations/EasyInstallResource:
|
|
705
|
-
Description: Don't use the deprecated easy_install resource
|
|
705
|
+
Description: "Don't use the deprecated `easy_install` resource, which was removed in Chef Infra Client 13."
|
|
706
706
|
StyleGuide: 'chef_deprecations_easyinstallresource'
|
|
707
707
|
Enabled: true
|
|
708
708
|
VersionAdded: '5.1.0'
|
|
@@ -712,7 +712,7 @@ Chef/Deprecations/EasyInstallResource:
|
|
|
712
712
|
- '**/Berksfile'
|
|
713
713
|
|
|
714
714
|
Chef/Deprecations/ErlCallResource:
|
|
715
|
-
Description: Don't use the deprecated erl_call resource removed in Chef Infra Client 13
|
|
715
|
+
Description: "Don't use the deprecated `erl_call` resource, which was removed in Chef Infra Client 13."
|
|
716
716
|
StyleGuide: 'chef_deprecations_erlcallresource'
|
|
717
717
|
Enabled: true
|
|
718
718
|
VersionAdded: '5.1.0'
|
|
@@ -722,7 +722,7 @@ Chef/Deprecations/ErlCallResource:
|
|
|
722
722
|
- '**/Berksfile'
|
|
723
723
|
|
|
724
724
|
Chef/Deprecations/RequireRecipe:
|
|
725
|
-
Description: Use include_recipe instead of the require_recipe method
|
|
725
|
+
Description: Use `include_recipe` instead of the deprecated `require_recipe` method, which was removed in Chef Infra Client 14.
|
|
726
726
|
StyleGuide: 'chef_deprecations_requirerecipe'
|
|
727
727
|
Enabled: true
|
|
728
728
|
VersionAdded: '5.2.0'
|
|
@@ -732,7 +732,7 @@ Chef/Deprecations/RequireRecipe:
|
|
|
732
732
|
- '**/Berksfile'
|
|
733
733
|
|
|
734
734
|
Chef/Deprecations/NodeMethodsInsteadofAttributes:
|
|
735
|
-
Description: Use node attributes to access Ohai data instead of node
|
|
735
|
+
Description: "Use `node['platform']` style attributes to access Ohai data instead of `node.platform` style method calls, which were deprecated in Chef Infra Client 13."
|
|
736
736
|
StyleGuide: 'chef_deprecations_nodemethodsinsteadofattributes'
|
|
737
737
|
Enabled: true
|
|
738
738
|
VersionAdded: '5.4.0'
|
|
@@ -741,7 +741,7 @@ Chef/Deprecations/NodeMethodsInsteadofAttributes:
|
|
|
741
741
|
- '**/Berksfile'
|
|
742
742
|
|
|
743
743
|
Chef/Deprecations/UsesDeprecatedMixins:
|
|
744
|
-
Description: Don't use deprecated
|
|
744
|
+
Description: "Don't use deprecated mixin modules (e.g., `Chef::Mixin::Command`, `Chef::Mixin::LanguageIncludeRecipe`) that were removed in Chef Infra Client 14. Use their modern replacements instead."
|
|
745
745
|
StyleGuide: 'chef_deprecations_usesdeprecatedmixins'
|
|
746
746
|
Enabled: true
|
|
747
747
|
VersionAdded: '5.4.0'
|
|
@@ -751,7 +751,7 @@ Chef/Deprecations/UsesDeprecatedMixins:
|
|
|
751
751
|
- '**/resources/*.rb'
|
|
752
752
|
|
|
753
753
|
Chef/Deprecations/IncludingXMLRubyRecipe:
|
|
754
|
-
Description:
|
|
754
|
+
Description: "There is no need to include the `xml::ruby` recipe to get the nokogiri gem. Nokogiri has been bundled with Chef Infra Client since version 12."
|
|
755
755
|
StyleGuide: 'chef_deprecations_includingxmlrubyrecipe'
|
|
756
756
|
Enabled: true
|
|
757
757
|
VersionAdded: '5.4.0'
|
|
@@ -769,7 +769,7 @@ Chef/Deprecations/LegacyYumCookbookRecipes:
|
|
|
769
769
|
- '**/metadata.rb'
|
|
770
770
|
|
|
771
771
|
Chef/Deprecations/UsesChefRESTHelpers:
|
|
772
|
-
Description: Don't use
|
|
772
|
+
Description: "Don't use helpers from `Chef::REST`, which was removed in Chef Infra Client 13. Use `Chef::ServerAPI` for making requests to the Chef Infra Server instead."
|
|
773
773
|
StyleGuide: 'chef_deprecations_useschefresthelpers'
|
|
774
774
|
Enabled: true
|
|
775
775
|
VersionAdded: '5.5.0'
|
|
@@ -777,7 +777,7 @@ Chef/Deprecations/UsesChefRESTHelpers:
|
|
|
777
777
|
- '**/metadata.rb'
|
|
778
778
|
|
|
779
779
|
Chef/Deprecations/ChocolateyPackageUninstallAction:
|
|
780
|
-
Description: Use the
|
|
780
|
+
Description: "Use the `:remove` action in the `chocolatey_package` resource instead of `:uninstall`, which was removed in Chef Infra Client 14."
|
|
781
781
|
StyleGuide: 'chef_deprecations_chocolateypackageuninstallaction'
|
|
782
782
|
Enabled: true
|
|
783
783
|
VersionAdded: '5.5.0'
|
|
@@ -785,7 +785,7 @@ Chef/Deprecations/ChocolateyPackageUninstallAction:
|
|
|
785
785
|
- '**/metadata.rb'
|
|
786
786
|
|
|
787
787
|
Chef/Deprecations/LaunchdDeprecatedHashProperty:
|
|
788
|
-
Description: The launchd resource's hash property was renamed to plist_hash in Chef Infra Client 13
|
|
788
|
+
Description: "The `launchd` resource's `hash` property was renamed to `plist_hash` in Chef Infra Client 13 to avoid conflicts with Ruby's built-in `hash` method."
|
|
789
789
|
StyleGuide: 'chef_deprecations_launchddeprecatedhashproperty'
|
|
790
790
|
Enabled: true
|
|
791
791
|
VersionAdded: '5.5.0'
|
|
@@ -793,7 +793,7 @@ Chef/Deprecations/LaunchdDeprecatedHashProperty:
|
|
|
793
793
|
- '**/metadata.rb'
|
|
794
794
|
|
|
795
795
|
Chef/Deprecations/LocaleDeprecatedLcAllProperty:
|
|
796
|
-
Description: The
|
|
796
|
+
Description: "The `locale` resource's `lc_all` property has been deprecated and was removed in Chef Infra Client 16. Setting LC_ALL is generally discouraged as it overrides all other locale settings."
|
|
797
797
|
StyleGuide: 'chef_deprecations_localedeprecatedlcallproperty'
|
|
798
798
|
Enabled: true
|
|
799
799
|
VersionAdded: '5.5.0'
|
|
@@ -801,7 +801,7 @@ Chef/Deprecations/LocaleDeprecatedLcAllProperty:
|
|
|
801
801
|
- '**/metadata.rb'
|
|
802
802
|
|
|
803
803
|
Chef/Deprecations/UserDeprecatedSupportsProperty:
|
|
804
|
-
Description: The supports property was removed in Chef Infra Client 13
|
|
804
|
+
Description: "The `user` resource's `supports` property was removed in Chef Infra Client 13. Use the individual `manage_home` and `non_unique` properties instead."
|
|
805
805
|
StyleGuide: 'chef_deprecations_userdeprecatedsupportsproperty'
|
|
806
806
|
Enabled: true
|
|
807
807
|
VersionAdded: '5.5.0'
|
|
@@ -809,7 +809,7 @@ Chef/Deprecations/UserDeprecatedSupportsProperty:
|
|
|
809
809
|
- '**/metadata.rb'
|
|
810
810
|
|
|
811
811
|
Chef/Deprecations/UseInlineResourcesDefined:
|
|
812
|
-
Description: use_inline_resources is
|
|
812
|
+
Description: "`use_inline_resources` is the default behavior in Chef Infra Client 13 and later and no longer needs to be called. Inline resources ensure that notifications from sub-resources work correctly."
|
|
813
813
|
StyleGuide: 'chef_deprecations_useinlineresourcesdefined'
|
|
814
814
|
Enabled: true
|
|
815
815
|
VersionAdded: '5.4.0'
|
|
@@ -827,7 +827,7 @@ Chef/Deprecations/IncludingYumDNFCompatRecipe:
|
|
|
827
827
|
- '**/metadata.rb'
|
|
828
828
|
|
|
829
829
|
Chef/Deprecations/WindowsTaskChangeAction:
|
|
830
|
-
Description: The :change action in the windows_task resource was removed when windows_task was added to Chef Infra Client 13+. The default action of :create
|
|
830
|
+
Description: The :change action in the windows_task resource was removed when windows_task was added to Chef Infra Client 13+. The default action of :create can now be used to create and update tasks.
|
|
831
831
|
StyleGuide: 'chef_deprecations_windowstaskchangeaction'
|
|
832
832
|
Enabled: true
|
|
833
833
|
VersionAdded: '5.6.0'
|
|
@@ -835,7 +835,7 @@ Chef/Deprecations/WindowsTaskChangeAction:
|
|
|
835
835
|
- '**/metadata.rb'
|
|
836
836
|
|
|
837
837
|
Chef/Deprecations/ResourceOverridesProvidesMethod:
|
|
838
|
-
Description: Don't override the provides
|
|
838
|
+
Description: "Don't override the `provides?` method in a resource provider. Use `provides :my_resource` instead to register the provider. Overriding `provides?` causes failures in Chef Infra Client 13 and later."
|
|
839
839
|
StyleGuide: 'chef_deprecations_resourceoverridesprovidesmethod'
|
|
840
840
|
Enabled: true
|
|
841
841
|
VersionAdded: '5.7.0'
|
|
@@ -845,7 +845,7 @@ Chef/Deprecations/ResourceOverridesProvidesMethod:
|
|
|
845
845
|
- '**/resources/*.rb'
|
|
846
846
|
|
|
847
847
|
Chef/Deprecations/ResourceUsesDslNameMethod:
|
|
848
|
-
Description: Use resource_name instead of the dsl_name method in resources.
|
|
848
|
+
Description: Use `resource_name` instead of the deprecated `dsl_name` method in resources. Using `dsl_name` causes failures in Chef Infra Client 13 and later.
|
|
849
849
|
StyleGuide: 'chef_deprecations_resourceusesdslnamemethod'
|
|
850
850
|
Enabled: true
|
|
851
851
|
VersionAdded: '5.7.0'
|
|
@@ -855,7 +855,7 @@ Chef/Deprecations/ResourceUsesDslNameMethod:
|
|
|
855
855
|
- '**/resources/*.rb'
|
|
856
856
|
|
|
857
857
|
Chef/Deprecations/ResourceUsesUpdatedMethod:
|
|
858
|
-
Description: Don't use updated = true/false to update resource state.
|
|
858
|
+
Description: "Don't use `updated = true/false` to update resource state. Use `updated_by_last_action` instead, or better yet, let Chef Infra Client handle convergence state automatically. Direct assignment causes failures in Chef Infra Client 13 and later."
|
|
859
859
|
StyleGuide: 'chef_deprecations_resourceusesupdatedmethod'
|
|
860
860
|
Enabled: false # has a high potential for false positives
|
|
861
861
|
VersionAdded: '5.7.0'
|
|
@@ -865,7 +865,7 @@ Chef/Deprecations/ResourceUsesUpdatedMethod:
|
|
|
865
865
|
- '**/resources/*.rb'
|
|
866
866
|
|
|
867
867
|
Chef/Deprecations/NamePropertyWithDefaultValue:
|
|
868
|
-
Description: A resource property can't be marked as
|
|
868
|
+
Description: "A resource property can't be marked as `name_property: true` and also have a `default` value. The name property gets its value from the resource name, so a default would be ignored. This causes failures in Chef Infra Client 13 and later."
|
|
869
869
|
StyleGuide: 'chef_deprecations_namepropertywithdefaultvalue'
|
|
870
870
|
Enabled: true
|
|
871
871
|
VersionAdded: '5.7.0'
|
|
@@ -883,7 +883,7 @@ Chef/Deprecations/ResourceUsesProviderBaseMethod:
|
|
|
883
883
|
- '**/resources/*.rb'
|
|
884
884
|
|
|
885
885
|
Chef/Deprecations/ChefSpecCoverageReport:
|
|
886
|
-
Description: Don't use the deprecated ChefSpec coverage report functionality in your specs.
|
|
886
|
+
Description: Don't use the deprecated ChefSpec coverage report functionality in your specs. The coverage report feature has been removed from newer versions of ChefSpec.
|
|
887
887
|
StyleGuide: 'chef_deprecations_chefspeccoveragereport'
|
|
888
888
|
Enabled: true
|
|
889
889
|
VersionAdded: '5.8.0'
|
|
@@ -899,7 +899,7 @@ Chef/Deprecations/ChefSpecLegacyRunner:
|
|
|
899
899
|
- '**/spec/*.rb'
|
|
900
900
|
|
|
901
901
|
Chef/Deprecations/UsesRunCommandHelper:
|
|
902
|
-
Description: Use
|
|
902
|
+
Description: Use `shell_out!` instead of the legacy `run_command` helper for running system commands. The `run_command` helper was removed in Chef Infra Client 13.
|
|
903
903
|
StyleGuide: 'chef_deprecations_usesruncommandhelper'
|
|
904
904
|
Enabled: true
|
|
905
905
|
VersionAdded: '5.9.0'
|
|
@@ -927,7 +927,7 @@ Chef/Deprecations/DeprecatedYumRepositoryProperties:
|
|
|
927
927
|
- '**/Berksfile'
|
|
928
928
|
|
|
929
929
|
Chef/Deprecations/EOLAuditModeUsage:
|
|
930
|
-
Description: The beta Audit Mode feature
|
|
930
|
+
Description: The beta Audit Mode feature was removed in Chef Infra Client 15.0. Use Chef InSpec for compliance auditing instead.
|
|
931
931
|
StyleGuide: 'chef_deprecations_eolauditmodeusage'
|
|
932
932
|
Enabled: true
|
|
933
933
|
VersionAdded: '5.10.0'
|
|
@@ -937,7 +937,7 @@ Chef/Deprecations/EOLAuditModeUsage:
|
|
|
937
937
|
- '**/Berksfile'
|
|
938
938
|
|
|
939
939
|
Chef/Deprecations/ResourceInheritsFromCompatResource:
|
|
940
|
-
Description: HWRP style
|
|
940
|
+
Description: "Heavy Weight Resource Provider (HWRP) style resources should inherit from `Chef::Resource` and not `ChefCompat::Resource` from the deprecated compat_resource cookbook."
|
|
941
941
|
StyleGuide: 'chef_deprecations_resourceinheritsfromcompatresource'
|
|
942
942
|
Enabled: true
|
|
943
943
|
VersionAdded: '5.10.0'
|
|
@@ -965,7 +965,7 @@ Chef/Deprecations/PoiseArchiveUsage:
|
|
|
965
965
|
- '**/Berksfile'
|
|
966
966
|
|
|
967
967
|
Chef/Deprecations/PartialSearchHelperUsage:
|
|
968
|
-
Description: Legacy partial_search usage should be updated to use
|
|
968
|
+
Description: "Legacy `partial_search` usage should be updated to use the `:filter_result` option in the built-in `search` helper instead."
|
|
969
969
|
StyleGuide: 'chef_deprecations_partialsearchhelperusage'
|
|
970
970
|
Enabled: true
|
|
971
971
|
VersionAdded: '5.11.0'
|
|
@@ -973,7 +973,7 @@ Chef/Deprecations/PartialSearchHelperUsage:
|
|
|
973
973
|
- '**/metadata.rb'
|
|
974
974
|
|
|
975
975
|
Chef/Deprecations/SearchUsesPositionalParameters:
|
|
976
|
-
Description: Don't use deprecated positional parameters in
|
|
976
|
+
Description: "Don't use deprecated positional parameters in search queries. Use named parameters instead (e.g., `search(:node, 'platform:ubuntu', filter_result: { 'name' => ['name'] })`)."
|
|
977
977
|
StyleGuide: 'chef_deprecations_searchusespositionalparameters'
|
|
978
978
|
Enabled: true
|
|
979
979
|
VersionAdded: '5.11.0'
|
|
@@ -981,7 +981,7 @@ Chef/Deprecations/SearchUsesPositionalParameters:
|
|
|
981
981
|
- '**/metadata.rb'
|
|
982
982
|
|
|
983
983
|
Chef/Deprecations/PartialSearchClassUsage:
|
|
984
|
-
Description:
|
|
984
|
+
Description: "Don't use the legacy `Chef::PartialSearch` class directly. Use the built-in `search` helper with the `:filter_result` option instead."
|
|
985
985
|
StyleGuide: 'chef_deprecations_partialsearchclassusage'
|
|
986
986
|
Enabled: true
|
|
987
987
|
VersionAdded: '5.11.0'
|
|
@@ -989,7 +989,7 @@ Chef/Deprecations/PartialSearchClassUsage:
|
|
|
989
989
|
- '**/metadata.rb'
|
|
990
990
|
|
|
991
991
|
Chef/Deprecations/Cheffile:
|
|
992
|
-
Description: The Librarian-Chef
|
|
992
|
+
Description: The Librarian-Chef dependency solver is no longer maintained. Use Policyfiles or Berkshelf for cookbook dependency management instead.
|
|
993
993
|
StyleGuide: 'chef_deprecations_cheffile'
|
|
994
994
|
Enabled: true
|
|
995
995
|
VersionAdded: '5.12.0'
|
|
@@ -1007,7 +1007,7 @@ Chef/Deprecations/LegacyNotifySyntax:
|
|
|
1007
1007
|
- '**/Berksfile'
|
|
1008
1008
|
|
|
1009
1009
|
Chef/Deprecations/NodeSetWithoutLevel:
|
|
1010
|
-
Description: When setting a node attribute
|
|
1010
|
+
Description: "When setting a node attribute you must specify a precedence level (e.g., `node.default`, `node.override`, or `node.normal`). Writing `node['key'] = value` without a level is deprecated."
|
|
1011
1011
|
StyleGuide: 'chef_deprecations_nodesetwithoutlevel'
|
|
1012
1012
|
Enabled: true
|
|
1013
1013
|
VersionAdded: '5.13.0'
|
|
@@ -1016,7 +1016,7 @@ Chef/Deprecations/NodeSetWithoutLevel:
|
|
|
1016
1016
|
- '**/attributes/*.rb'
|
|
1017
1017
|
|
|
1018
1018
|
Chef/Deprecations/ChefRewind:
|
|
1019
|
-
Description: Use delete_resource
|
|
1019
|
+
Description: Use the built-in `delete_resource` and `edit_resource` helpers (available since Chef Infra Client 12.10) instead of the deprecated `chef-rewind` gem.
|
|
1020
1020
|
StyleGuide: 'chef_deprecations_chefrewind'
|
|
1021
1021
|
Enabled: true
|
|
1022
1022
|
VersionAdded: '5.14.0'
|
|
@@ -1025,7 +1025,7 @@ Chef/Deprecations/ChefRewind:
|
|
|
1025
1025
|
- '**/attributes/*.rb'
|
|
1026
1026
|
|
|
1027
1027
|
Chef/Deprecations/RubyBlockCreateAction:
|
|
1028
|
-
Description: Use the
|
|
1028
|
+
Description: "Use the `:run` action in the `ruby_block` resource instead of the deprecated `:create` action."
|
|
1029
1029
|
StyleGuide: 'chef_deprecations_rubyblockcreateaction'
|
|
1030
1030
|
Enabled: true
|
|
1031
1031
|
VersionAdded: '5.16.0'
|
|
@@ -1046,7 +1046,7 @@ Chef/Deprecations/DeprecatedPlatformMethods:
|
|
|
1046
1046
|
- '**/providers/*.rb'
|
|
1047
1047
|
|
|
1048
1048
|
Chef/Deprecations/DeprecatedChefSpecPlatform:
|
|
1049
|
-
Description: Use currently supported platforms in ChefSpec listed at https://github.com/chef/fauxhai/blob/main/PLATFORMS.md. Fauxhai / ChefSpec will perform fuzzy matching on platform version so it's always best to be less specific
|
|
1049
|
+
Description: Use currently supported platforms in ChefSpec listed at https://github.com/chef/fauxhai/blob/main/PLATFORMS.md. Fauxhai / ChefSpec will perform fuzzy matching on platform version so it's always best to be less specific i.e. 10 instead of 10.3
|
|
1050
1050
|
StyleGuide: 'chef_deprecations_deprecatedchefspecplatform'
|
|
1051
1051
|
Enabled: true
|
|
1052
1052
|
VersionAdded: '5.20.0'
|
|
@@ -1091,7 +1091,7 @@ Chef/Deprecations/LogResourceNotifications:
|
|
|
1091
1091
|
- '**/Berksfile'
|
|
1092
1092
|
|
|
1093
1093
|
Chef/Deprecations/HWRPWithoutProvides:
|
|
1094
|
-
Description: In Chef Infra Client 16 and later a legacy HWRP resource must use `provides` to define how the resource is called in recipes or other resources. To maintain compatibility with Chef Infra Client < 16 use both `resource_name` and `provides`.
|
|
1094
|
+
Description: In Chef Infra Client 16 and later a legacy Heavy Weight Resource Provider (HWRP) resource must use `provides` to define how the resource is called in recipes or other resources. To maintain compatibility with Chef Infra Client < 16 use both `resource_name` and `provides`.
|
|
1095
1095
|
StyleGuide: 'chef_deprecations_hwrpwithoutprovides'
|
|
1096
1096
|
Enabled: true
|
|
1097
1097
|
VersionAdded: '6.0.0'
|
|
@@ -1100,7 +1100,7 @@ Chef/Deprecations/HWRPWithoutProvides:
|
|
|
1100
1100
|
- '**/libraries/*.rb'
|
|
1101
1101
|
|
|
1102
1102
|
Chef/Deprecations/WindowsVersionHelpers:
|
|
1103
|
-
Description: Use node['platform_version']
|
|
1103
|
+
Description: "Use `node['platform_version']` to check Windows versions instead of the `Windows::VersionHelper` helpers from the deprecated Windows cookbook."
|
|
1104
1104
|
StyleGuide: 'chef_deprecations_windowsversionhelpers'
|
|
1105
1105
|
Enabled: true
|
|
1106
1106
|
VersionAdded: '5.4.0'
|
|
@@ -1118,7 +1118,7 @@ Chef/Deprecations/PowershellCookbookHelpers:
|
|
|
1118
1118
|
- '**/Berksfile'
|
|
1119
1119
|
|
|
1120
1120
|
Chef/Deprecations/DeprecatedShelloutMethods:
|
|
1121
|
-
Description: Many legacy specialized shell_out methods were replaced in Chef Infra Client 14.3 and removed in Chef Infra Client 15. Use shell_out
|
|
1121
|
+
Description: Many legacy specialized `shell_out` methods were replaced in Chef Infra Client 14.3 and removed in Chef Infra Client 15. Use the standard `shell_out` or `shell_out!` methods with any additional options if necessary.
|
|
1122
1122
|
StyleGuide: 'chef_deprecations_deprecatedshelloutmethods'
|
|
1123
1123
|
Enabled: true
|
|
1124
1124
|
VersionAdded: '6.3.0'
|
|
@@ -1237,7 +1237,7 @@ Chef/Deprecations/UseYamlDump:
|
|
|
1237
1237
|
VersionAdded: '6.21.0'
|
|
1238
1238
|
|
|
1239
1239
|
Chef/Deprecations/LibrarianChefSpec:
|
|
1240
|
-
Description: The Librarian-Chef
|
|
1240
|
+
Description: The Librarian-Chef dependency solver is no longer maintained and ChefSpec should not use it. Use Policyfiles or Berkshelf for cookbook dependency management instead.
|
|
1241
1241
|
StyleGuide: 'chef_deprecations_librarianchefspec'
|
|
1242
1242
|
Enabled: true
|
|
1243
1243
|
VersionAdded: '7.1.0'
|
|
@@ -1245,7 +1245,7 @@ Chef/Deprecations/LibrarianChefSpec:
|
|
|
1245
1245
|
- '**/specs/*.rb'
|
|
1246
1246
|
|
|
1247
1247
|
Chef/Deprecations/FoodcriticTesting:
|
|
1248
|
-
Description: The Foodcritic cookbook linter has been deprecated and
|
|
1248
|
+
Description: The Foodcritic cookbook linter has been deprecated and is no longer maintained. Use Cookstyle instead for cookbook linting and style checking.
|
|
1249
1249
|
StyleGuide: 'chef_deprecations_foodcritictesting'
|
|
1250
1250
|
Enabled: true
|
|
1251
1251
|
VersionAdded: '7.1.0'
|
|
@@ -1254,7 +1254,7 @@ Chef/Deprecations/FoodcriticTesting:
|
|
|
1254
1254
|
- '**/Gemfile'
|
|
1255
1255
|
|
|
1256
1256
|
Chef/Deprecations/FoodcriticFile:
|
|
1257
|
-
Description: The
|
|
1257
|
+
Description: The .foodcritic configuration file is no longer needed. Foodcritic has been deprecated in favor of Cookstyle for cookbook linting.
|
|
1258
1258
|
StyleGuide: 'chef_deprecations_foodcriticfile'
|
|
1259
1259
|
Enabled: true
|
|
1260
1260
|
VersionAdded: '7.32.0'
|
|
@@ -1283,7 +1283,7 @@ Chef/Deprecations/ChefSugarHelpers:
|
|
|
1283
1283
|
- '**/Rakefile'
|
|
1284
1284
|
|
|
1285
1285
|
Chef/Deprecations/HWRPWithoutUnifiedTrue:
|
|
1286
|
-
Description: Set `unified_mode true` in Chef Infra Client 15.3+ HWRP style custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default.
|
|
1286
|
+
Description: Set `unified_mode true` in Chef Infra Client 15.3+ Heavy Weight Resource Provider (HWRP) style custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default.
|
|
1287
1287
|
StyleGuide: 'chef_deprecations_hwrpwithoutunifiedtrue'
|
|
1288
1288
|
Enabled: true
|
|
1289
1289
|
VersionAdded: '7.12.0'
|
|
@@ -1302,7 +1302,7 @@ Chef/Deprecations/ResourceWithoutUnifiedTrue:
|
|
|
1302
1302
|
- '**/spec/**/*.rb'
|
|
1303
1303
|
|
|
1304
1304
|
Chef/Deprecations/PolicyfileCommunitySource:
|
|
1305
|
-
Description: The Policyfile source
|
|
1305
|
+
Description: "The Policyfile source `:community` has been replaced with `:supermarket`. Update your Policyfile.rb to use `default_source :supermarket`."
|
|
1306
1306
|
StyleGuide: 'chef_deprecations_policyfilecommunitysource'
|
|
1307
1307
|
Enabled: true
|
|
1308
1308
|
VersionAdded: '7.15.0'
|
|
@@ -1363,7 +1363,7 @@ Chef/Modernize:
|
|
|
1363
1363
|
StyleGuideBaseURL: https://docs.chef.io/workstation/cookstyle/
|
|
1364
1364
|
|
|
1365
1365
|
Chef/Modernize/LegacyBerksfileSource:
|
|
1366
|
-
Description: Do not use legacy Berksfile community sources
|
|
1366
|
+
Description: "Do not use legacy Berksfile community sources like `site :opscode`. Use `source 'https://supermarket.chef.io'` instead."
|
|
1367
1367
|
StyleGuide: 'chef_modernize_legacyberksfilesource'
|
|
1368
1368
|
Enabled: true
|
|
1369
1369
|
VersionAdded: '5.1.0'
|
|
@@ -1371,7 +1371,7 @@ Chef/Modernize/LegacyBerksfileSource:
|
|
|
1371
1371
|
- '**/Berksfile'
|
|
1372
1372
|
|
|
1373
1373
|
Chef/Modernize/WhyRunSupportedTrue:
|
|
1374
|
-
Description: whyrun_supported
|
|
1374
|
+
Description: "`whyrun_supported?` no longer needs to be set to true as it is the default in Chef Infra Client 13 and later. Why-run mode allows you to see what Chef would change without actually making changes."
|
|
1375
1375
|
StyleGuide: 'chef_modernize_whyrunsupportedtrue'
|
|
1376
1376
|
Enabled: true
|
|
1377
1377
|
VersionAdded: '5.1.0'
|
|
@@ -1389,7 +1389,7 @@ Chef/Modernize/UnnecessaryDependsChef14:
|
|
|
1389
1389
|
- '**/metadata.rb'
|
|
1390
1390
|
|
|
1391
1391
|
Chef/Modernize/RespondToInMetadata:
|
|
1392
|
-
Description: It is no longer necessary to
|
|
1392
|
+
Description: "It is no longer necessary to wrap metadata.rb methods in `respond_to?` checks. This pattern was used for compatibility with older Chef versions, but all current metadata methods are supported since Chef Infra Client 12.15."
|
|
1393
1393
|
StyleGuide: 'chef_modernize_respondtoinmetadata'
|
|
1394
1394
|
Enabled: true
|
|
1395
1395
|
VersionAdded: '5.2.0'
|
|
@@ -1397,7 +1397,7 @@ Chef/Modernize/RespondToInMetadata:
|
|
|
1397
1397
|
- '**/metadata.rb'
|
|
1398
1398
|
|
|
1399
1399
|
Chef/Modernize/RespondToResourceName:
|
|
1400
|
-
Description:
|
|
1400
|
+
Description: "Wrapping `resource_name` in a `respond_to?` check is no longer necessary. The `resource_name` method has been available since Chef Infra Client 12.5."
|
|
1401
1401
|
StyleGuide: 'chef_modernize_respondtoresourcename'
|
|
1402
1402
|
Enabled: true
|
|
1403
1403
|
VersionAdded: '5.2.0'
|
|
@@ -1406,7 +1406,7 @@ Chef/Modernize/RespondToResourceName:
|
|
|
1406
1406
|
- '**/libraries/*.rb'
|
|
1407
1407
|
|
|
1408
1408
|
Chef/Modernize/RespondToProvides:
|
|
1409
|
-
Description:
|
|
1409
|
+
Description: "Wrapping `provides` in a `respond_to?` check is no longer necessary. The `provides` method has been available since Chef Infra Client 12."
|
|
1410
1410
|
StyleGuide: 'chef_modernize_respondtoprovides'
|
|
1411
1411
|
Enabled: true
|
|
1412
1412
|
VersionAdded: '5.2.0'
|
|
@@ -1416,7 +1416,7 @@ Chef/Modernize/RespondToProvides:
|
|
|
1416
1416
|
- '**/libraries/*.rb'
|
|
1417
1417
|
|
|
1418
1418
|
Chef/Modernize/SetOrReturnInResources:
|
|
1419
|
-
Description: Do not use
|
|
1419
|
+
Description: Do not use the legacy `set_or_return` method to define resource properties. Use the `property` method instead, which supports validation, default values, documentation, and reporting.
|
|
1420
1420
|
StyleGuide: 'chef_modernize_setorreturninresources'
|
|
1421
1421
|
Enabled: true
|
|
1422
1422
|
VersionAdded: '5.2.0'
|
|
@@ -1425,7 +1425,7 @@ Chef/Modernize/SetOrReturnInResources:
|
|
|
1425
1425
|
- '**/libraries/*.rb'
|
|
1426
1426
|
|
|
1427
1427
|
Chef/Modernize/CustomResourceWithAttributes:
|
|
1428
|
-
Description: Custom
|
|
1428
|
+
Description: Custom resources should use `property` to define inputs instead of the legacy `attribute` method. Properties offer better validation, documentation, and reporting features.
|
|
1429
1429
|
StyleGuide: 'chef_modernize_customresourcewithattributes'
|
|
1430
1430
|
Enabled: true
|
|
1431
1431
|
VersionAdded: '5.2.0'
|
|
@@ -1449,7 +1449,7 @@ Chef/Modernize/IncludingWindowsDefaultRecipe:
|
|
|
1449
1449
|
- '**/metadata.rb'
|
|
1450
1450
|
|
|
1451
1451
|
Chef/Modernize/DefinesChefSpecMatchers:
|
|
1452
|
-
Description: ChefSpec matchers are now
|
|
1452
|
+
Description: ChefSpec matchers are now automatically generated by ChefSpec 7.1 and later. You no longer need to manually define custom matchers in your cookbook libraries.
|
|
1453
1453
|
StyleGuide: 'chef_modernize_defineschefspecmatchers'
|
|
1454
1454
|
Enabled: true
|
|
1455
1455
|
VersionAdded: '5.3.0'
|
|
@@ -1457,7 +1457,7 @@ Chef/Modernize/DefinesChefSpecMatchers:
|
|
|
1457
1457
|
- '**/libraries/*.rb'
|
|
1458
1458
|
|
|
1459
1459
|
Chef/Modernize/ExecuteAptUpdate:
|
|
1460
|
-
Description: Use the apt_update resource instead of
|
|
1460
|
+
Description: Use the `apt_update` resource instead of shelling out with an `execute` resource to run `apt-get update`. The `apt_update` resource is idempotent and handles update frequency automatically.
|
|
1461
1461
|
StyleGuide: 'chef_modernize_executeaptupdate'
|
|
1462
1462
|
Enabled: true
|
|
1463
1463
|
VersionAdded: '5.3.0'
|
|
@@ -1465,7 +1465,7 @@ Chef/Modernize/ExecuteAptUpdate:
|
|
|
1465
1465
|
- '**/metadata.rb'
|
|
1466
1466
|
|
|
1467
1467
|
Chef/Modernize/MinitestHandlerUsage:
|
|
1468
|
-
Description: Use Chef InSpec for testing instead of the Minitest Handler cookbook pattern.
|
|
1468
|
+
Description: Use Chef InSpec for integration testing instead of the deprecated Minitest Handler cookbook pattern, which is no longer maintained.
|
|
1469
1469
|
StyleGuide: 'chef_modernize_minitesthandlerusage'
|
|
1470
1470
|
Enabled: true
|
|
1471
1471
|
VersionAdded: '5.4.0'
|
|
@@ -1473,7 +1473,7 @@ Chef/Modernize/MinitestHandlerUsage:
|
|
|
1473
1473
|
- '**/metadata.rb'
|
|
1474
1474
|
|
|
1475
1475
|
Chef/Modernize/IncludingMixinShelloutInResources:
|
|
1476
|
-
Description: There is no need to include Chef::Mixin::ShellOut or Chef::Mixin::PowershellOut in resources or providers
|
|
1476
|
+
Description: There is no need to `include Chef::Mixin::ShellOut` or `Chef::Mixin::PowershellOut` in resources or providers. These are already included automatically by Chef Infra Client 12.4 and later.
|
|
1477
1477
|
StyleGuide: 'chef_modernize_includingmixinshelloutinresources'
|
|
1478
1478
|
Enabled: true
|
|
1479
1479
|
VersionAdded: '5.4.0'
|
|
@@ -1483,7 +1483,7 @@ Chef/Modernize/IncludingMixinShelloutInResources:
|
|
|
1483
1483
|
- '**/libraries/*.rb'
|
|
1484
1484
|
|
|
1485
1485
|
Chef/Modernize/UseBuildEssentialResource:
|
|
1486
|
-
Description: Use the build_essential resource instead of the
|
|
1486
|
+
Description: Use the `build_essential` resource instead of including the `build-essential` recipe. The resource is built into Chef Infra Client 14 and later and gives you more control over when build tools are installed.
|
|
1487
1487
|
StyleGuide: 'chef_modernize_usebuildessentialresource'
|
|
1488
1488
|
Enabled: true
|
|
1489
1489
|
VersionAdded: '5.1.0'
|
|
@@ -1491,7 +1491,7 @@ Chef/Modernize/UseBuildEssentialResource:
|
|
|
1491
1491
|
- '**/metadata.rb'
|
|
1492
1492
|
|
|
1493
1493
|
Chef/Modernize/WindowsZipfileUsage:
|
|
1494
|
-
Description: Use the archive_file resource built into Chef Infra Client 15
|
|
1494
|
+
Description: Use the `archive_file` resource built into Chef Infra Client 15 and later instead of `windows_zipfile` from the Windows cookbook.
|
|
1495
1495
|
StyleGuide: 'chef_modernize_windowszipfileusage'
|
|
1496
1496
|
Enabled: true
|
|
1497
1497
|
VersionAdded: '5.4.0'
|
|
@@ -1499,7 +1499,7 @@ Chef/Modernize/WindowsZipfileUsage:
|
|
|
1499
1499
|
- '**/metadata.rb'
|
|
1500
1500
|
|
|
1501
1501
|
Chef/Modernize/SevenZipArchiveResource:
|
|
1502
|
-
Description: Use the archive_file resource built into Chef Infra Client 15
|
|
1502
|
+
Description: Use the `archive_file` resource built into Chef Infra Client 15 and later instead of `seven_zip_archive`.
|
|
1503
1503
|
StyleGuide: 'chef_modernize_sevenziparchiveresource'
|
|
1504
1504
|
Enabled: true
|
|
1505
1505
|
VersionAdded: '5.5.0'
|
|
@@ -1507,7 +1507,7 @@ Chef/Modernize/SevenZipArchiveResource:
|
|
|
1507
1507
|
- '**/metadata.rb'
|
|
1508
1508
|
|
|
1509
1509
|
Chef/Modernize/LibarchiveFileResource:
|
|
1510
|
-
Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the
|
|
1510
|
+
Description: Use the archive_file resource built into Chef Infra Client 15+ instead of the libarchive_file resource from the libarchive cookbook
|
|
1511
1511
|
StyleGuide: 'chef_modernize_libarchivefileresource'
|
|
1512
1512
|
Enabled: true
|
|
1513
1513
|
VersionAdded: '5.5.0'
|
|
@@ -1555,7 +1555,7 @@ Chef/Modernize/CronManageResource:
|
|
|
1555
1555
|
- '**/metadata.rb'
|
|
1556
1556
|
|
|
1557
1557
|
Chef/Modernize/UsesZypperRepo:
|
|
1558
|
-
Description: The zypper_repo resource was renamed zypper_repository when it was added to Chef Infra Client 13.3.
|
|
1558
|
+
Description: The `zypper_repo` resource was renamed to `zypper_repository` when it was added to Chef Infra Client 13.3. Use the new name.
|
|
1559
1559
|
StyleGuide: 'chef_modernize_useszypperrepo'
|
|
1560
1560
|
Enabled: true
|
|
1561
1561
|
VersionAdded: '5.6.0'
|
|
@@ -1563,7 +1563,7 @@ Chef/Modernize/UsesZypperRepo:
|
|
|
1563
1563
|
- '**/metadata.rb'
|
|
1564
1564
|
|
|
1565
1565
|
Chef/Modernize/DependsOnZypperCookbook:
|
|
1566
|
-
Description: Don't
|
|
1566
|
+
Description: "Don't depend on the zypper cookbook. The `zypper_repository` resource is built into Chef Infra Client 13.3 and later."
|
|
1567
1567
|
StyleGuide: 'chef_modernize_dependsonzyppercookbook'
|
|
1568
1568
|
Enabled: true
|
|
1569
1569
|
VersionAdded: '5.6.0'
|
|
@@ -1571,7 +1571,7 @@ Chef/Modernize/DependsOnZypperCookbook:
|
|
|
1571
1571
|
- '**/metadata.rb'
|
|
1572
1572
|
|
|
1573
1573
|
Chef/Modernize/ExecuteTzUtil:
|
|
1574
|
-
Description: Use the timezone resource
|
|
1574
|
+
Description: Use the `timezone` resource built into Chef Infra Client 14.6 and later instead of shelling out to `tzutil`.
|
|
1575
1575
|
StyleGuide: 'chef_modernize_executetzutil'
|
|
1576
1576
|
Enabled: true
|
|
1577
1577
|
VersionAdded: '5.6.0'
|
|
@@ -1579,7 +1579,7 @@ Chef/Modernize/ExecuteTzUtil:
|
|
|
1579
1579
|
- '**/metadata.rb'
|
|
1580
1580
|
|
|
1581
1581
|
Chef/Modernize/OpensslRsaKeyResource:
|
|
1582
|
-
Description: The openssl_rsa_key resource was renamed to openssl_rsa_private_key in Chef Infra Client 14.0.
|
|
1582
|
+
Description: The `openssl_rsa_key` resource was renamed to `openssl_rsa_private_key` in Chef Infra Client 14.0. Use the new name.
|
|
1583
1583
|
StyleGuide: 'chef_modernize_opensslrsakeyresource'
|
|
1584
1584
|
Enabled: true
|
|
1585
1585
|
VersionAdded: '5.6.0'
|
|
@@ -1587,7 +1587,7 @@ Chef/Modernize/OpensslRsaKeyResource:
|
|
|
1587
1587
|
- '**/metadata.rb'
|
|
1588
1588
|
|
|
1589
1589
|
Chef/Modernize/OpensslX509Resource:
|
|
1590
|
-
Description: The openssl_x509 resource was renamed to openssl_x509_certificate in Chef Infra Client 14.4.
|
|
1590
|
+
Description: The `openssl_x509` resource was renamed to `openssl_x509_certificate` in Chef Infra Client 14.4. Use the new name.
|
|
1591
1591
|
StyleGuide: 'chef_modernize_opensslx509resource'
|
|
1592
1592
|
Enabled: true
|
|
1593
1593
|
VersionAdded: '5.6.0'
|
|
@@ -1595,7 +1595,7 @@ Chef/Modernize/OpensslX509Resource:
|
|
|
1595
1595
|
- '**/metadata.rb'
|
|
1596
1596
|
|
|
1597
1597
|
Chef/Modernize/OsxConfigProfileResource:
|
|
1598
|
-
Description: The osx_config_profile resource was renamed to osx_profile
|
|
1598
|
+
Description: The `osx_config_profile` resource was renamed to `osx_profile`. Use the new name.
|
|
1599
1599
|
StyleGuide: 'chef_modernize_osxconfigprofileresource'
|
|
1600
1600
|
Enabled: true
|
|
1601
1601
|
VersionAdded: '5.6.0'
|
|
@@ -1603,7 +1603,7 @@ Chef/Modernize/OsxConfigProfileResource:
|
|
|
1603
1603
|
- '**/metadata.rb'
|
|
1604
1604
|
|
|
1605
1605
|
Chef/Modernize/SysctlParamResource:
|
|
1606
|
-
Description: The sysctl_param resource was renamed to sysctl when it was added to Chef Infra Client 14.0.
|
|
1606
|
+
Description: The `sysctl_param` resource was renamed to `sysctl` when it was added to Chef Infra Client 14.0. Use the new name.
|
|
1607
1607
|
StyleGuide: 'chef_modernize_sysctlparamresource'
|
|
1608
1608
|
Enabled: true
|
|
1609
1609
|
VersionAdded: '5.6.0'
|
|
@@ -1611,7 +1611,7 @@ Chef/Modernize/SysctlParamResource:
|
|
|
1611
1611
|
- '**/metadata.rb'
|
|
1612
1612
|
|
|
1613
1613
|
Chef/Modernize/MacOsXUserdefaults:
|
|
1614
|
-
Description: The mac_os_x_userdefaults resource was renamed to macos_userdefaults
|
|
1614
|
+
Description: The `mac_os_x_userdefaults` resource was renamed to `macos_userdefaults` in Chef Infra Client 14.0. Use the new name.
|
|
1615
1615
|
StyleGuide: 'chef_modernize_macosxuserdefaults'
|
|
1616
1616
|
Enabled: true
|
|
1617
1617
|
VersionAdded: '5.6.0'
|
|
@@ -1619,7 +1619,7 @@ Chef/Modernize/MacOsXUserdefaults:
|
|
|
1619
1619
|
- '**/metadata.rb'
|
|
1620
1620
|
|
|
1621
1621
|
Chef/Modernize/PowerShellGuardInterpreter:
|
|
1622
|
-
Description: PowerShell is already
|
|
1622
|
+
Description: PowerShell is already the default guard interpreter for `powershell_script` resources in Chef Infra Client 13 and later. There is no need to set `guard_interpreter :powershell_script` explicitly.
|
|
1623
1623
|
StyleGuide: 'chef_modernize_powershellguardinterpreter'
|
|
1624
1624
|
Enabled: true
|
|
1625
1625
|
VersionAdded: '5.9.0'
|
|
@@ -1637,7 +1637,7 @@ Chef/Modernize/DefaultActionFromInitialize:
|
|
|
1637
1637
|
- '**/libraries/*.rb'
|
|
1638
1638
|
|
|
1639
1639
|
Chef/Modernize/ResourceNameFromInitialize:
|
|
1640
|
-
Description:
|
|
1640
|
+
Description: Set the resource name using the `resource_name` helper instead of overriding the `initialize` method. The helper is simpler and less error-prone.
|
|
1641
1641
|
StyleGuide: 'chef_modernize_resourcenamefrominitialize'
|
|
1642
1642
|
Enabled: true
|
|
1643
1643
|
VersionAdded: '5.10.0'
|
|
@@ -1647,7 +1647,7 @@ Chef/Modernize/ResourceNameFromInitialize:
|
|
|
1647
1647
|
- '**/libraries/*.rb'
|
|
1648
1648
|
|
|
1649
1649
|
Chef/Modernize/Definitions:
|
|
1650
|
-
Description: Legacy Chef Infra definitions should be rewritten as custom resources
|
|
1650
|
+
Description: Legacy Chef Infra definitions should be rewritten as custom resources. Custom resources support notifications, why-run mode, reporting, and other features that definitions lack.
|
|
1651
1651
|
StyleGuide: 'chef_modernize_definitions'
|
|
1652
1652
|
Enabled: true
|
|
1653
1653
|
VersionAdded: '5.11.0'
|
|
@@ -1655,7 +1655,7 @@ Chef/Modernize/Definitions:
|
|
|
1655
1655
|
- '**/definitions/*.rb'
|
|
1656
1656
|
|
|
1657
1657
|
Chef/Modernize/IfProvidesDefaultAction:
|
|
1658
|
-
Description: if defined
|
|
1658
|
+
Description: Wrapping `default_action` in an `if defined?` check is no longer necessary. The `default_action` helper has been available since Chef Infra Client 10.8.
|
|
1659
1659
|
StyleGuide: 'chef_modernize_ifprovidesdefaultaction'
|
|
1660
1660
|
Enabled: true
|
|
1661
1661
|
VersionAdded: '5.12.0'
|
|
@@ -1697,7 +1697,7 @@ Chef/Modernize/ChefGemNokogiri:
|
|
|
1697
1697
|
- '**/attributes/*.rb'
|
|
1698
1698
|
|
|
1699
1699
|
Chef/Modernize/PropertyWithNameAttribute:
|
|
1700
|
-
Description:
|
|
1700
|
+
Description: "Use `name_property: true` instead of the legacy `name_attribute: true` when defining resource properties. Both work the same way, but `name_property` is the current convention."
|
|
1701
1701
|
StyleGuide: 'chef_modernize_propertywithnameattribute'
|
|
1702
1702
|
Enabled: true
|
|
1703
1703
|
VersionAdded: '5.1.0'
|
|
@@ -1717,7 +1717,7 @@ Chef/Modernize/IncludingOhaiDefaultRecipe:
|
|
|
1717
1717
|
- '**/Berksfile'
|
|
1718
1718
|
|
|
1719
1719
|
Chef/Modernize/AllowedActionsFromInitialize:
|
|
1720
|
-
Description:
|
|
1720
|
+
Description: Set the allowed actions of a resource using the `allowed_actions` helper instead of overriding the `initialize` method.
|
|
1721
1721
|
StyleGuide: 'chef_modernize_allowedactionsfrominitialize'
|
|
1722
1722
|
Enabled: true
|
|
1723
1723
|
VersionAdded: '5.15.0'
|
|
@@ -1842,7 +1842,7 @@ Chef/Modernize/UseMultipackageInstalls:
|
|
|
1842
1842
|
- '**/Berksfile'
|
|
1843
1843
|
|
|
1844
1844
|
Chef/Modernize/ProvidesFromInitialize:
|
|
1845
|
-
Description:
|
|
1845
|
+
Description: Set `provides` using the resource DSL method instead of setting `@provides` in the `initialize` method.
|
|
1846
1846
|
StyleGuide: 'chef_modernize_providesfrominitialize'
|
|
1847
1847
|
Enabled: true
|
|
1848
1848
|
VersionAdded: '6.0.0'
|
|
@@ -2036,7 +2036,7 @@ Chef/RedundantCode:
|
|
|
2036
2036
|
StyleGuideBaseURL: https://docs.chef.io/workstation/cookstyle/
|
|
2037
2037
|
|
|
2038
2038
|
Chef/RedundantCode/ConflictsMetadata:
|
|
2039
|
-
Description: Don't use the
|
|
2039
|
+
Description: "Don't use the `conflicts` method in metadata.rb. This field was never used by Chef Infra Server or Client and is unnecessary."
|
|
2040
2040
|
StyleGuide: 'chef_redundantcode_conflictsmetadata'
|
|
2041
2041
|
Enabled: true
|
|
2042
2042
|
VersionAdded: '5.1.0'
|
|
@@ -2045,7 +2045,7 @@ Chef/RedundantCode/ConflictsMetadata:
|
|
|
2045
2045
|
- '**/metadata.rb'
|
|
2046
2046
|
|
|
2047
2047
|
Chef/RedundantCode/SuggestsMetadata:
|
|
2048
|
-
Description: The suggests metadata.rb
|
|
2048
|
+
Description: The `suggests` method in metadata.rb is not used by Chef Infra Server or Client and can be safely removed.
|
|
2049
2049
|
StyleGuide: 'chef_redundantcode_suggestsmetadata'
|
|
2050
2050
|
Enabled: true
|
|
2051
2051
|
VersionAdded: '5.1.0'
|
|
@@ -2054,7 +2054,7 @@ Chef/RedundantCode/SuggestsMetadata:
|
|
|
2054
2054
|
- '**/metadata.rb'
|
|
2055
2055
|
|
|
2056
2056
|
Chef/RedundantCode/ProvidesMetadata:
|
|
2057
|
-
Description: The provides metadata.rb
|
|
2057
|
+
Description: The `provides` method in metadata.rb is not used by Chef Infra Server or Client and can be safely removed.
|
|
2058
2058
|
StyleGuide: 'chef_redundantcode_providesmetadata'
|
|
2059
2059
|
Enabled: true
|
|
2060
2060
|
VersionAdded: '5.1.0'
|
|
@@ -2063,7 +2063,7 @@ Chef/RedundantCode/ProvidesMetadata:
|
|
|
2063
2063
|
- '**/metadata.rb'
|
|
2064
2064
|
|
|
2065
2065
|
Chef/RedundantCode/ReplacesMetadata:
|
|
2066
|
-
Description: The replaces metadata.rb
|
|
2066
|
+
Description: The `replaces` method in metadata.rb is not used by Chef Infra Server or Client and can be safely removed.
|
|
2067
2067
|
StyleGuide: 'chef_redundantcode_replacesmetadata'
|
|
2068
2068
|
Enabled: true
|
|
2069
2069
|
VersionAdded: '5.1.0'
|
|
@@ -2072,7 +2072,7 @@ Chef/RedundantCode/ReplacesMetadata:
|
|
|
2072
2072
|
- '**/metadata.rb'
|
|
2073
2073
|
|
|
2074
2074
|
Chef/RedundantCode/AttributeMetadata:
|
|
2075
|
-
Description: The attribute metadata.rb
|
|
2075
|
+
Description: The `attribute` method in metadata.rb is not used by Chef Infra Server or Client and can be safely removed.
|
|
2076
2076
|
StyleGuide: 'chef_redundantcode_attributemetadata'
|
|
2077
2077
|
Enabled: true
|
|
2078
2078
|
VersionAdded: '5.1.0'
|
|
@@ -2081,7 +2081,7 @@ Chef/RedundantCode/AttributeMetadata:
|
|
|
2081
2081
|
- '**/metadata.rb'
|
|
2082
2082
|
|
|
2083
2083
|
Chef/RedundantCode/LongDescriptionMetadata:
|
|
2084
|
-
Description: The long_description metadata.rb
|
|
2084
|
+
Description: The `long_description` method in metadata.rb is not used by Chef Infra Server or Client and can be safely removed.
|
|
2085
2085
|
StyleGuide: 'chef_redundantcode_longdescriptionmetadata'
|
|
2086
2086
|
Enabled: true
|
|
2087
2087
|
VersionAdded: '5.2.0'
|
|
@@ -2090,7 +2090,7 @@ Chef/RedundantCode/LongDescriptionMetadata:
|
|
|
2090
2090
|
- '**/metadata.rb'
|
|
2091
2091
|
|
|
2092
2092
|
Chef/RedundantCode/RecipeMetadata:
|
|
2093
|
-
Description: The recipe metadata.rb
|
|
2093
|
+
Description: The `recipe` method in metadata.rb is not used by Chef Infra Server or Client and can be safely removed. Document recipes in your README.md file instead.
|
|
2094
2094
|
StyleGuide: 'chef_redundantcode_recipemetadata'
|
|
2095
2095
|
Enabled: true
|
|
2096
2096
|
VersionAdded: '5.6.0'
|
|
@@ -2099,7 +2099,7 @@ Chef/RedundantCode/RecipeMetadata:
|
|
|
2099
2099
|
- '**/metadata.rb'
|
|
2100
2100
|
|
|
2101
2101
|
Chef/RedundantCode/ResourceWithNothingAction:
|
|
2102
|
-
Description: There is no need to define a
|
|
2102
|
+
Description: "There is no need to define a `:nothing` action in your resource. Chef Infra Client automatically provides the `:nothing` action for every resource."
|
|
2103
2103
|
StyleGuide: 'chef_redundantcode_resourcewithnothingaction'
|
|
2104
2104
|
Enabled: true
|
|
2105
2105
|
VersionAdded: '5.12.0'
|
|
@@ -2120,7 +2120,7 @@ Chef/RedundantCode/UnnecessaryNameProperty:
|
|
|
2120
2120
|
- '**/libraries/*.rb'
|
|
2121
2121
|
|
|
2122
2122
|
Chef/RedundantCode/PropertyWithRequiredAndDefault:
|
|
2123
|
-
Description:
|
|
2123
|
+
Description: "A resource property should not be both `required: true` and have a `default` value. If a property has a default it will always have a value, making `required` unnecessary."
|
|
2124
2124
|
StyleGuide: 'chef_redundantcode_propertywithrequiredanddefault'
|
|
2125
2125
|
Enabled: true
|
|
2126
2126
|
VersionAdded: '5.1.0'
|
|
@@ -2130,7 +2130,7 @@ Chef/RedundantCode/PropertyWithRequiredAndDefault:
|
|
|
2130
2130
|
- '**/libraries/*.rb'
|
|
2131
2131
|
|
|
2132
2132
|
Chef/RedundantCode/NamePropertyIsRequired:
|
|
2133
|
-
Description: Resource properties marked as
|
|
2133
|
+
Description: "Resource properties marked as `name_property: true` should not also have `required: true`. Name properties are automatically set from the resource block name and will always have a value."
|
|
2134
2134
|
StyleGuide: 'chef_redundantcode_namepropertyisrequired'
|
|
2135
2135
|
Enabled: true
|
|
2136
2136
|
VersionAdded: '5.1.0'
|
|
@@ -2149,7 +2149,7 @@ Chef/RedundantCode/CustomResourceWithAllowedActions:
|
|
|
2149
2149
|
- '**/resources/*.rb'
|
|
2150
2150
|
|
|
2151
2151
|
Chef/RedundantCode/SensitivePropertyInResource:
|
|
2152
|
-
Description: Every Chef Infra
|
|
2152
|
+
Description: Every Chef Infra resource already includes a `sensitive` property with a default value of `false`. There is no need to redefine it in your custom resource.
|
|
2153
2153
|
StyleGuide: 'chef_redundantcode_sensitivepropertyinresource'
|
|
2154
2154
|
Enabled: true
|
|
2155
2155
|
VersionAdded: '5.16.0'
|
|
@@ -2167,7 +2167,7 @@ Chef/RedundantCode/UnnecessaryDesiredState:
|
|
|
2167
2167
|
- '**/libraries/*.rb'
|
|
2168
2168
|
|
|
2169
2169
|
Chef/RedundantCode/AptRepositoryNotifiesAptUpdate:
|
|
2170
|
-
Description: There is no need to notify an apt-get update when an apt_repository is created
|
|
2170
|
+
Description: There is no need to notify an `apt-get update` when an `apt_repository` is created. The `apt_repository` resource automatically triggers a cache update.
|
|
2171
2171
|
StyleGuide: 'chef_redundantcode_aptrepositorynotifiesaptupdate'
|
|
2172
2172
|
Enabled: true
|
|
2173
2173
|
VersionAdded: '5.17.0'
|
|
@@ -2187,7 +2187,7 @@ Chef/RedundantCode/AptRepositoryDistributionDefault:
|
|
|
2187
2187
|
- '**/Berksfile'
|
|
2188
2188
|
|
|
2189
2189
|
Chef/RedundantCode/GroupingMetadata:
|
|
2190
|
-
Description: The grouping metadata.rb
|
|
2190
|
+
Description: The `grouping` method in metadata.rb is not used by Chef Infra Server or Client and can be safely removed.
|
|
2191
2191
|
StyleGuide: 'chef_redundantcode_groupingmetadata'
|
|
2192
2192
|
Enabled: true
|
|
2193
2193
|
VersionAdded: '5.19.0'
|
|
@@ -2195,7 +2195,7 @@ Chef/RedundantCode/GroupingMetadata:
|
|
|
2195
2195
|
- '**/metadata.rb'
|
|
2196
2196
|
|
|
2197
2197
|
Chef/RedundantCode/StringPropertyWithNilDefault:
|
|
2198
|
-
Description:
|
|
2198
|
+
Description: "Resource properties default to `nil` automatically, so explicitly setting `default: nil` is unnecessary."
|
|
2199
2199
|
StyleGuide: 'chef_redundantcode_stringpropertywithnildefault'
|
|
2200
2200
|
Enabled: true
|
|
2201
2201
|
VersionAdded: '5.21.0'
|
|
@@ -2204,7 +2204,7 @@ Chef/RedundantCode/StringPropertyWithNilDefault:
|
|
|
2204
2204
|
- '**/libraries/*.rb'
|
|
2205
2205
|
|
|
2206
2206
|
Chef/RedundantCode/PropertySplatRegex:
|
|
2207
|
-
Description:
|
|
2207
|
+
Description: "Avoid using a regex like `/.*/` to validate resource properties, since a pattern that matches everything provides no real validation."
|
|
2208
2208
|
StyleGuide: 'chef_redundantcode_propertysplatregex'
|
|
2209
2209
|
Enabled: true
|
|
2210
2210
|
VersionAdded: '5.21.0'
|
|
@@ -2213,7 +2213,7 @@ Chef/RedundantCode/PropertySplatRegex:
|
|
|
2213
2213
|
- '**/libraries/*.rb'
|
|
2214
2214
|
|
|
2215
2215
|
Chef/RedundantCode/UseCreateIfMissing:
|
|
2216
|
-
Description: Use the
|
|
2216
|
+
Description: "Use the `:create_if_missing` action instead of pairing `:create` with a `not_if { ::File.exist?(...) }` guard. The built-in action is cleaner and less error-prone."
|
|
2217
2217
|
StyleGuide: 'chef_redundantcode_usecreateifmissing'
|
|
2218
2218
|
Enabled: true
|
|
2219
2219
|
VersionAdded: '6.2.0'
|
|
@@ -2223,7 +2223,7 @@ Chef/RedundantCode/UseCreateIfMissing:
|
|
|
2223
2223
|
- '**/Berksfile'
|
|
2224
2224
|
|
|
2225
2225
|
Chef/RedundantCode/OhaiAttributeToString:
|
|
2226
|
-
Description: Many Ohai node attributes are already strings
|
|
2226
|
+
Description: "Many Ohai node attributes (like `node['platform']`) are already strings, so calling `.to_s` on them is unnecessary."
|
|
2227
2227
|
StyleGuide: 'chef_redundantcode_ohaiattributetostring'
|
|
2228
2228
|
Enabled: true
|
|
2229
2229
|
VersionAdded: '6.10.0'
|
|
@@ -2232,7 +2232,7 @@ Chef/RedundantCode/OhaiAttributeToString:
|
|
|
2232
2232
|
- '**/Berksfile'
|
|
2233
2233
|
|
|
2234
2234
|
Chef/RedundantCode/MultiplePlatformChecks:
|
|
2235
|
-
Description:
|
|
2235
|
+
Description: "The `platform?` and `platform_family?` helpers accept multiple arguments, so use `platform?('ubuntu', 'debian')` instead of calling the helper multiple times."
|
|
2236
2236
|
StyleGuide: 'chef_redundantcode_multipleplatformchecks'
|
|
2237
2237
|
Enabled: true
|
|
2238
2238
|
VersionAdded: '6.10.0'
|
|
@@ -2241,7 +2241,7 @@ Chef/RedundantCode/MultiplePlatformChecks:
|
|
|
2241
2241
|
- '**/Berksfile'
|
|
2242
2242
|
|
|
2243
2243
|
Chef/RedundantCode/DoubleCompileTime:
|
|
2244
|
-
Description: If a resource
|
|
2244
|
+
Description: "If a resource already sets `compile_time true`, there is no need to also call `.run_action(:some_action)` on the resource block. Both achieve compile-time execution, so using both is redundant."
|
|
2245
2245
|
StyleGuide: 'chef_redundantcode_doublecompiletime'
|
|
2246
2246
|
Enabled: true
|
|
2247
2247
|
VersionAdded: '6.13.0'
|
|
@@ -2259,7 +2259,7 @@ Chef/Effortless:
|
|
|
2259
2259
|
StyleGuideBaseURL: https://docs.chef.io/workstation/cookstyle/
|
|
2260
2260
|
|
|
2261
2261
|
Chef/Effortless/CookbookUsesSearch:
|
|
2262
|
-
Description: Cookbook uses search, which
|
|
2262
|
+
Description: Cookbook uses search, which is not available in the Effortless Infra pattern since there is no Chef Infra Server.
|
|
2263
2263
|
StyleGuide: 'chef_effortless_cookbookusessearch'
|
|
2264
2264
|
Enabled: false
|
|
2265
2265
|
VersionAdded: '5.1.0'
|
|
@@ -2268,7 +2268,7 @@ Chef/Effortless/CookbookUsesSearch:
|
|
|
2268
2268
|
- '**/Berksfile'
|
|
2269
2269
|
|
|
2270
2270
|
Chef/Effortless/CookbookUsesDatabags:
|
|
2271
|
-
Description: Cookbook uses data bags, which
|
|
2271
|
+
Description: Cookbook uses data bags, which are not available in the Effortless Infra pattern since there is no Chef Infra Server.
|
|
2272
2272
|
StyleGuide: 'chef_effortless_cookbookusesdatabags'
|
|
2273
2273
|
Enabled: false
|
|
2274
2274
|
VersionAdded: '5.1.0'
|
|
@@ -2278,7 +2278,7 @@ Chef/Effortless/CookbookUsesDatabags:
|
|
|
2278
2278
|
|
|
2279
2279
|
# https://github.com/chef/cookstyle/issues/346
|
|
2280
2280
|
Chef/Effortless/ChefVaultUsed:
|
|
2281
|
-
Description: Cookbook uses Chef Vault, which
|
|
2281
|
+
Description: Cookbook uses Chef Vault, which is not available in the Effortless Infra pattern. Use Habitat secrets or another secrets management solution instead.
|
|
2282
2282
|
StyleGuide: 'chef_effortless_chefvaultused'
|
|
2283
2283
|
Enabled: false
|
|
2284
2284
|
VersionAdded: '6.19'
|
|
@@ -2288,7 +2288,7 @@ Chef/Effortless/ChefVaultUsed:
|
|
|
2288
2288
|
|
|
2289
2289
|
# https://github.com/chef/cookstyle/issues/346
|
|
2290
2290
|
Chef/Effortless/DependsChefVault:
|
|
2291
|
-
Description: Cookbook
|
|
2291
|
+
Description: "Cookbook declares a dependency on the `chef-vault` cookbook in metadata.rb, which is not available in the Effortless Infra pattern."
|
|
2292
2292
|
StyleGuide: 'chef_effortless_dependschefvault'
|
|
2293
2293
|
Enabled: false
|
|
2294
2294
|
VersionAdded: '6.19'
|
|
@@ -2296,7 +2296,7 @@ Chef/Effortless/DependsChefVault:
|
|
|
2296
2296
|
- '**/metadata.rb'
|
|
2297
2297
|
|
|
2298
2298
|
Chef/Effortless/CookbookUsesEnvironments:
|
|
2299
|
-
Description: Cookbook uses environments, which
|
|
2299
|
+
Description: Cookbook uses Chef Infra Server environments, which are not available in the Effortless Infra pattern.
|
|
2300
2300
|
StyleGuide: 'chef_effortless_cookbookusesenvironments'
|
|
2301
2301
|
Enabled: false
|
|
2302
2302
|
VersionAdded: '5.10.0'
|
|
@@ -2305,7 +2305,7 @@ Chef/Effortless/CookbookUsesEnvironments:
|
|
|
2305
2305
|
- '**/Berksfile'
|
|
2306
2306
|
|
|
2307
2307
|
Chef/Effortless/CookbookUsesPolicygroups:
|
|
2308
|
-
Description: Cookbook uses Policy Groups, which
|
|
2308
|
+
Description: Cookbook uses Policy Groups, which are not available in the Effortless Infra pattern.
|
|
2309
2309
|
StyleGuide: 'chef_effortless_cookbookusespolicygroups'
|
|
2310
2310
|
Enabled: false
|
|
2311
2311
|
VersionAdded: '5.10.0'
|
|
@@ -2314,7 +2314,7 @@ Chef/Effortless/CookbookUsesPolicygroups:
|
|
|
2314
2314
|
- '**/Berksfile'
|
|
2315
2315
|
|
|
2316
2316
|
Chef/Effortless/CookbookUsesRoles:
|
|
2317
|
-
Description: Cookbook uses
|
|
2317
|
+
Description: Cookbook uses Chef Infra Server roles, which are not available in the Effortless Infra pattern.
|
|
2318
2318
|
StyleGuide: 'chef_effortless_cookbookusesroles'
|
|
2319
2319
|
Enabled: false
|
|
2320
2320
|
VersionAdded: '5.10.0'
|
|
@@ -2323,7 +2323,7 @@ Chef/Effortless/CookbookUsesRoles:
|
|
|
2323
2323
|
- '**/Berksfile'
|
|
2324
2324
|
|
|
2325
2325
|
Chef/Effortless/SearchForEnvironmentsOrRoles:
|
|
2326
|
-
Description: Cookbook uses search with a node query that
|
|
2326
|
+
Description: Cookbook uses search with a node query that filters by role or environment, which are not available in the Effortless Infra pattern.
|
|
2327
2327
|
StyleGuide: 'chef_effortless_searchforenvironmentsorroles'
|
|
2328
2328
|
Enabled: false
|
|
2329
2329
|
VersionAdded: '5.11.0'
|
|
@@ -2345,7 +2345,7 @@ InSpec/Deprecations:
|
|
|
2345
2345
|
StyleGuideBaseURL: https://docs.chef.io/workstation/cookstyle/
|
|
2346
2346
|
|
|
2347
2347
|
InSpec/Deprecations/AttributeHelper:
|
|
2348
|
-
Description: InSpec attributes have been renamed to inputs. Use the `input` method
|
|
2348
|
+
Description: "InSpec attributes have been renamed to inputs. Use the `input` method instead of the deprecated `attribute` method to access these values."
|
|
2349
2349
|
StyleGuide: 'inspec_deprecations_attributehelper'
|
|
2350
2350
|
Enabled: true
|
|
2351
2351
|
VersionAdded: '7.14.0'
|
|
@@ -2353,7 +2353,7 @@ InSpec/Deprecations/AttributeHelper:
|
|
|
2353
2353
|
- '**/controls/*.rb'
|
|
2354
2354
|
|
|
2355
2355
|
InSpec/Deprecations/AttributeDefault:
|
|
2356
|
-
Description: The InSpec inputs `default` option has been
|
|
2356
|
+
Description: "The InSpec inputs `default` option has been renamed to `value`. Update your input declarations to use the new option name."
|
|
2357
2357
|
StyleGuide: 'inspec_deprecations_attributedefaults'
|
|
2358
2358
|
Enabled: true
|
|
2359
2359
|
VersionAdded: '7.14.0'
|
|
@@ -3301,3 +3301,11 @@ Style/CollectionQuerying:
|
|
|
3301
3301
|
# use `include?(element)` instead of `intersect?([element])`
|
|
3302
3302
|
Style/ArrayIntersectWithSingleElement:
|
|
3303
3303
|
Enabled: true
|
|
3304
|
+
|
|
3305
|
+
# use `.method_defined?(:foo) instead of `.instance_methods.include?(:foo)` which is much slower
|
|
3306
|
+
Style/ModuleMemberExistenceCheck:
|
|
3307
|
+
Enabled: true
|
|
3308
|
+
|
|
3309
|
+
# simplify array access
|
|
3310
|
+
Style/NegativeArrayIndex:
|
|
3311
|
+
Enabled: true
|