cookstyle 6.14.7 → 6.16.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/config/cookstyle.yml +54 -16
- data/config/disable_all.yml +48 -4
- data/config/upstream.yml +175 -27
- data/cookstyle.gemspec +1 -0
- data/lib/cookstyle.rb +2 -2
- data/lib/cookstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +7 -9
- data/lib/rubocop/cop/chef/correctness/chef_application_fatal.rb +5 -9
- data/lib/rubocop/cop/chef/correctness/conditional_ruby_shellout.rb +5 -9
- data/lib/rubocop/cop/chef/correctness/dnf_package_allow_downgrades.rb +5 -8
- data/lib/rubocop/cop/chef/correctness/incorrect_library_injection.rb +11 -9
- data/lib/rubocop/cop/chef/correctness/invalid_default_action.rb +3 -2
- data/lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb +3 -2
- data/lib/rubocop/cop/chef/correctness/invalid_platform_family_helper.rb +16 -21
- data/lib/rubocop/cop/chef/correctness/invalid_platform_family_values_in_case.rb +15 -23
- data/lib/rubocop/cop/chef/correctness/invalid_platform_helper.rb +3 -2
- data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +13 -14
- data/lib/rubocop/cop/chef/correctness/invalid_platform_values_in_case.rb +13 -22
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +5 -3
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_helper.rb +5 -3
- data/lib/rubocop/cop/chef/correctness/invalid_version_metadata.rb +3 -4
- data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +5 -8
- data/lib/rubocop/cop/chef/correctness/macos_userdefaults_invalid_type.rb +2 -3
- data/lib/rubocop/cop/chef/correctness/malformed_value_for_platform.rb +6 -7
- data/lib/rubocop/cop/chef/correctness/metadata_missing_name.rb +5 -12
- 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 +7 -7
- data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/powershell_delete_file.rb +4 -4
- 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 +6 -2
- data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +6 -8
- data/lib/rubocop/cop/chef/correctness/service_resource.rb +3 -2
- data/lib/rubocop/cop/chef/correctness/supports_must_be_float.rb +1 -0
- data/lib/rubocop/cop/chef/correctness/tmp_path.rb +4 -4
- data/lib/rubocop/cop/chef/deprecation/ use_automatic_resource_name.rb +1 -2
- data/lib/rubocop/cop/chef/{correctness → deprecation}/cb_depends_on_self.rb +7 -11
- data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +7 -10
- data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +4 -3
- data/lib/rubocop/cop/chef/deprecation/chef_rewind.rb +16 -28
- data/lib/rubocop/cop/chef/deprecation/chef_windows_platform_helper.rb +5 -8
- data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +3 -6
- data/lib/rubocop/cop/chef/deprecation/cheffile.rb +3 -5
- data/lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb +5 -8
- data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +5 -8
- data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/depends_partial_search.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/depends_poise.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_chefspec_platform.rb +11 -14
- data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +12 -10
- data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +11 -12
- data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +8 -8
- data/lib/rubocop/cop/chef/deprecation/easy_install.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/eol_audit_mode.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/epic_fail.rb +5 -6
- data/lib/rubocop/cop/chef/deprecation/erl_call.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +11 -12
- data/lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/launchd_deprecated_hash_property.rb +6 -9
- data/lib/rubocop/cop/chef/deprecation/legacy_notify_syntax.rb +6 -9
- data/lib/rubocop/cop/chef/deprecation/legacy_yum_cookbook_recipes.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/locale_lc_all_property.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/name_property_and_default.rb +5 -9
- data/lib/rubocop/cop/chef/deprecation/node_methods_not_attributes.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/node_set.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/node_set_unless.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/node_set_without_level.rb +6 -4
- data/lib/rubocop/cop/chef/deprecation/partial_search_class_usage.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/partial_search_helper_usage.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/poise_archive.rb +6 -3
- data/lib/rubocop/cop/chef/deprecation/powershell_cookbook_helpers.rb +5 -9
- data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +8 -7
- data/lib/rubocop/cop/chef/deprecation/resource_overrides_provides_method.rb +3 -4
- data/lib/rubocop/cop/chef/deprecation/resource_uses_dsl_name_method.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/resource_uses_only_resource_name.rb +8 -11
- data/lib/rubocop/cop/chef/deprecation/resource_uses_provider_base_method.rb +3 -2
- data/lib/rubocop/cop/chef/deprecation/resource_uses_updated_method.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +7 -10
- data/lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/run_command_helper.rb +5 -4
- data/lib/rubocop/cop/chef/deprecation/search_uses_positional_parameters.rb +7 -8
- data/lib/rubocop/cop/chef/deprecation/use_inline_resources.rb +10 -13
- data/lib/rubocop/cop/chef/deprecation/user_supports_property.rb +11 -14
- data/lib/rubocop/cop/chef/deprecation/verify_property_file_expansion.rb +6 -8
- data/lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb +2 -2
- data/lib/rubocop/cop/chef/deprecation/windows_task_change_action.rb +11 -16
- data/lib/rubocop/cop/chef/deprecation/windows_version_helpers.rb +4 -9
- data/lib/rubocop/cop/chef/deprecation/xml_ruby_recipe.rb +7 -8
- data/lib/rubocop/cop/chef/deprecation/yum_dnf_compat_recipe.rb +6 -8
- data/lib/rubocop/cop/chef/effortless/berksfile.rb +3 -5
- data/lib/rubocop/cop/chef/effortless/data_bags.rb +3 -2
- data/lib/rubocop/cop/chef/effortless/node_environment.rb +6 -3
- data/lib/rubocop/cop/chef/effortless/node_policygroup.rb +6 -3
- data/lib/rubocop/cop/chef/effortless/node_roles.rb +6 -3
- data/lib/rubocop/cop/chef/effortless/search_for_environments_or_roles.rb +4 -3
- data/lib/rubocop/cop/chef/effortless/search_used.rb +3 -2
- data/lib/rubocop/cop/chef/modernize/allowed_actions_initializer.rb +16 -16
- data/lib/rubocop/cop/chef/modernize/apt_default_recipe.rb +3 -2
- data/lib/rubocop/cop/chef/modernize/berksfile_source.rb +10 -9
- data/lib/rubocop/cop/chef/modernize/build_essential.rb +7 -8
- data/lib/rubocop/cop/chef/modernize/chef_14_resources.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/chef_gem_nokogiri.rb +12 -10
- data/lib/rubocop/cop/chef/modernize/compile_time_resources.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/conditional_using_test.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/cron_d_file_or_template.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/cron_manage_resource.rb +4 -6
- data/lib/rubocop/cop/chef/modernize/databag_helpers.rb +7 -8
- data/lib/rubocop/cop/chef/modernize/default_action_initializer.rb +11 -13
- data/lib/rubocop/cop/chef/modernize/defines_chefspec_matchers.rb +5 -8
- data/lib/rubocop/cop/chef/modernize/definitions.rb +2 -2
- data/lib/rubocop/cop/chef/modernize/depends_zypper_cookbook.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/dsl_include_in_resource.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/empty_resource_initialize.rb +5 -8
- data/lib/rubocop/cop/chef/modernize/execute_apt_update.rb +7 -4
- data/lib/rubocop/cop/chef/modernize/execute_sc_exe.rb +7 -9
- data/lib/rubocop/cop/chef/modernize/execute_sleep.rb +7 -11
- data/lib/rubocop/cop/chef/modernize/execute_sysctl.rb +6 -9
- data/lib/rubocop/cop/chef/modernize/execute_tzutil.rb +8 -4
- data/lib/rubocop/cop/chef/modernize/foodcritic_comments.rb +7 -12
- data/lib/rubocop/cop/chef/modernize/if_provides_default_action.rb +4 -6
- data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/libarchive_file.rb +13 -9
- data/lib/rubocop/cop/chef/modernize/macos_user_defaults.rb +4 -6
- data/lib/rubocop/cop/chef/modernize/minitest_handler_usage.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/node_roles_include.rb +5 -9
- data/lib/rubocop/cop/chef/modernize/ohai_default_recipe.rb +3 -2
- data/lib/rubocop/cop/chef/modernize/openssl_rsa_key_resource.rb +4 -6
- data/lib/rubocop/cop/chef/modernize/openssl_x509_resource.rb +4 -6
- data/lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb +5 -6
- data/lib/rubocop/cop/chef/modernize/powershell_expand_archive.rb +3 -4
- data/lib/rubocop/cop/chef/modernize/powershell_guard_interpreter.rb +5 -9
- data/lib/rubocop/cop/chef/modernize/powershell_install_package.rb +3 -4
- data/lib/rubocop/cop/chef/modernize/powershell_install_windowsfeature.rb +3 -4
- data/lib/rubocop/cop/chef/modernize/property_with_name_attribute.rb +6 -9
- data/lib/rubocop/cop/chef/modernize/provides_initializer.rb +13 -15
- data/lib/rubocop/cop/chef/modernize/resource_name_initializer.rb +10 -14
- data/lib/rubocop/cop/chef/modernize/resource_set_or_return.rb +3 -4
- data/lib/rubocop/cop/chef/modernize/resource_with_attributes.rb +8 -8
- data/lib/rubocop/cop/chef/modernize/respond_to_compile_time.rb +4 -9
- data/lib/rubocop/cop/chef/modernize/respond_to_metadata.rb +20 -16
- data/lib/rubocop/cop/chef/modernize/respond_to_provides.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/respond_to_resource_name.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/sc_windows_resource.rb +2 -1
- data/lib/rubocop/cop/chef/modernize/seven_zip_archive.rb +3 -2
- data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +3 -8
- data/lib/rubocop/cop/chef/modernize/shellouts_to_chocolatey.rb +5 -7
- data/lib/rubocop/cop/chef/modernize/simplify_apt_ppa_setup.rb +6 -10
- data/lib/rubocop/cop/chef/modernize/{systctl_param_resource.rb → sysctl_param_resource.rb} +4 -6
- data/lib/rubocop/cop/chef/modernize/unnecessary_mixlib_shellout_require.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/use_multipackage_installs.rb +11 -10
- data/lib/rubocop/cop/chef/modernize/use_require_relative.rb +7 -9
- data/lib/rubocop/cop/chef/modernize/whyrun_supported_true.rb +5 -8
- data/lib/rubocop/cop/chef/modernize/windows_default_recipe.rb +6 -8
- data/lib/rubocop/cop/chef/modernize/windows_registry_uac.rb +6 -7
- data/lib/rubocop/cop/chef/modernize/windows_zipfile.rb +3 -2
- data/lib/rubocop/cop/chef/modernize/zipfile_resource.rb +4 -3
- data/lib/rubocop/cop/chef/modernize/zypper_repo.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/apt_repository_distribution_default.rb +5 -8
- data/lib/rubocop/cop/chef/redundant/apt_repository_notifies_apt_update.rb +6 -8
- data/lib/rubocop/cop/chef/redundant/attribute_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/conflicts_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/custom_resource_with_allowed_actions.rb +5 -13
- data/lib/rubocop/cop/chef/redundant/grouping_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/long_description_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/multiple_platform_checks.rb +7 -9
- data/lib/rubocop/cop/chef/redundant/name_property_and_required.rb +2 -2
- data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +4 -8
- data/lib/rubocop/cop/chef/redundant/property_splat_regex.rb +8 -9
- data/lib/rubocop/cop/chef/redundant/property_with_default_and_required.rb +5 -9
- data/lib/rubocop/cop/chef/redundant/provides_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/recipe_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/replaces_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/resource_with_nothing_action.rb +5 -8
- data/lib/rubocop/cop/chef/redundant/sensitive_property_in_resource.rb +6 -7
- data/lib/rubocop/cop/chef/redundant/string_property_with_nil_default.rb +7 -9
- data/lib/rubocop/cop/chef/redundant/suggests_metadata.rb +4 -6
- data/lib/rubocop/cop/chef/redundant/unnecessary_desired_state.rb +1 -0
- data/lib/rubocop/cop/chef/redundant/unnecessary_name_property.rb +10 -9
- data/lib/rubocop/cop/chef/redundant/use_create_if_missing.rb +7 -9
- data/lib/rubocop/cop/chef/sharing/default_maintainer_metadata.rb +3 -2
- data/lib/rubocop/cop/chef/sharing/empty_metadata_field.rb +4 -3
- data/lib/rubocop/cop/chef/sharing/include_property_descriptions.rb +4 -3
- data/lib/rubocop/cop/chef/sharing/include_resource_descriptions.rb +5 -5
- data/lib/rubocop/cop/chef/sharing/include_resource_examples.rb +4 -4
- data/lib/rubocop/cop/chef/sharing/insecure_cookbook_url.rb +7 -8
- data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +8 -12
- data/lib/rubocop/cop/chef/style/chef_whaaat.rb +3 -4
- data/lib/rubocop/cop/chef/style/comment_sentence_spacing.rb +5 -7
- data/lib/rubocop/cop/chef/style/comments_copyright_format.rb +5 -9
- data/lib/rubocop/cop/chef/style/comments_default_copyright.rb +5 -7
- data/lib/rubocop/cop/chef/style/comments_format.rb +13 -16
- data/lib/rubocop/cop/chef/style/file_mode.rb +1 -0
- data/lib/rubocop/cop/chef/style/immediate_notification_timing.rb +7 -8
- data/lib/rubocop/cop/chef/style/include_recipe_with_parentheses.rb +1 -0
- data/lib/rubocop/cop/chef/style/negating_only_if.rb +5 -9
- data/lib/rubocop/cop/chef/style/overly_complex_supports_depends_metadata.rb +5 -9
- data/lib/rubocop/cop/chef/style/simplify_platform_major_version_check.rb +6 -8
- data/lib/rubocop/cop/chef/style/true_false_resource_properties.rb +6 -9
- data/lib/rubocop/cop/chef/style/unnecessary_os_check.rb +17 -28
- data/lib/rubocop/cop/chef/style/unnecessary_platform_case_statement.rb +5 -9
- data/lib/rubocop/cop/chef/style/use_platform_helpers.rb +11 -19
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 478785b2c4e9672c7a684b3612420b4cff2191d7711238f9daa45e2b0a8b02d8
|
4
|
+
data.tar.gz: 6d2af42693cfa0f26cba72cdd6d0dc05ef5c1069f3573a22a0b4a2441564529d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7870c3d596adc50c7f6c6fd377513629ec373cb56b972115bb31887dbd38122730f0461fa03e86ae73598a3385d95413a760ece7128325e568f3b423afba2dd0
|
7
|
+
data.tar.gz: bbae89086e0358c8fcbc6e6eaabfe4f581954334be3983039720a025729750ef2acb1c772df5e00441fc1d0bc4f59a84217a4ea51dc758e5f46e02d1dac7bd9d
|
data/Gemfile
CHANGED
data/config/cookstyle.yml
CHANGED
@@ -210,14 +210,6 @@ ChefCorrectness/CookbookUsesNodeSave:
|
|
210
210
|
- '**/metadata.rb'
|
211
211
|
- '**/Berksfile'
|
212
212
|
|
213
|
-
ChefCorrectness/CookbooksDependsOnSelf:
|
214
|
-
Description: A cookbook cannot depend on itself
|
215
|
-
StyleGuide: '#chefcorrectnesscookbooksdependonself'
|
216
|
-
Enabled: true
|
217
|
-
VersionAdded: '5.2.0'
|
218
|
-
Include:
|
219
|
-
- '**/metadata.rb'
|
220
|
-
|
221
213
|
ChefCorrectness/MetadataMissingName:
|
222
214
|
Description: The metadata.rb file is missing the name field which is required by Chef Infra Client 12 and later
|
223
215
|
StyleGuide: '#chefcorrectnessmetadatamissingname'
|
@@ -1061,6 +1053,15 @@ ChefDeprecations/MacosUserdefaultsGlobalProperty:
|
|
1061
1053
|
- '**/metadata.rb'
|
1062
1054
|
- '**/Berksfile'
|
1063
1055
|
|
1056
|
+
ChefDeprecations/CookbooksDependsOnSelf:
|
1057
|
+
Description: A cookbook cannot depend on itself in Chef Infra Client 13 or later.
|
1058
|
+
StyleGuide: '#chefdeprecationscookbooksdependonself'
|
1059
|
+
Enabled: true
|
1060
|
+
VersionAdded: '5.2.0'
|
1061
|
+
VersionChanged: '6.16.0'
|
1062
|
+
Include:
|
1063
|
+
- '**/metadata.rb'
|
1064
|
+
|
1064
1065
|
###############################
|
1065
1066
|
# ChefModernize: Cleaning up legacy code and using new built-in resources
|
1066
1067
|
###############################
|
@@ -2206,10 +2207,6 @@ Style/WordArray:
|
|
2206
2207
|
Enabled: true
|
2207
2208
|
Style/ZeroLengthPredicate:
|
2208
2209
|
Enabled: true
|
2209
|
-
Metrics/BlockNesting:
|
2210
|
-
Enabled: true
|
2211
|
-
Metrics/ParameterLists:
|
2212
|
-
Enabled: true
|
2213
2210
|
Lint/AmbiguousOperator:
|
2214
2211
|
Enabled: true
|
2215
2212
|
Lint/AssignmentInCondition:
|
@@ -2341,16 +2338,16 @@ Metrics/CyclomaticComplexity:
|
|
2341
2338
|
Enabled: false
|
2342
2339
|
Metrics/PerceivedComplexity:
|
2343
2340
|
Enabled: false
|
2344
|
-
|
2345
|
-
|
2341
|
+
Metrics/BlockNesting:
|
2342
|
+
Enabled: false
|
2343
|
+
Metrics/ParameterLists:
|
2344
|
+
Enabled: false
|
2346
2345
|
|
2347
2346
|
# This updates how we send helpers into the Chef recipe/resource classes and makes WAY more sense
|
2348
2347
|
# Chef::Recipe.send(:include, ::Apt::Helpers) -> Chef::Recipe.include ::Apt::Helpers
|
2349
2348
|
Lint/SendWithMixinArgument:
|
2350
2349
|
Enabled: true
|
2351
2350
|
|
2352
|
-
#### END COPS FOR THE NEXT MAJOR RELEASE
|
2353
|
-
|
2354
2351
|
# this migrates old # rubocop: comments to use the latest namespaces, which prevents a ton of spam during cookstyle runs
|
2355
2352
|
Migration/DepartmentName:
|
2356
2353
|
Enabled: true
|
@@ -2575,3 +2572,44 @@ Style/HashEachMethods:
|
|
2575
2572
|
# We want to catch this deprecation in cookbooks
|
2576
2573
|
Lint/DeprecatedOpenSSLConstant:
|
2577
2574
|
Enabled: true
|
2575
|
+
|
2576
|
+
# This just isn't a big deal in the context of a cookbook
|
2577
|
+
Naming/AccessorMethodName:
|
2578
|
+
Enabled: false
|
2579
|
+
|
2580
|
+
# Rescuing a particular exception twice isn't going to work
|
2581
|
+
Lint/DuplicateRescueException:
|
2582
|
+
Enabled: true
|
2583
|
+
|
2584
|
+
# if b == 0 && b == 0 is invalid and we should flag it
|
2585
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
2586
|
+
Enabled: true
|
2587
|
+
|
2588
|
+
# returning at the top level with an arg is invalid
|
2589
|
+
# @TODO we can enable this once this is fixed: https://github.com/rubocop-hq/rubocop/issues/8462
|
2590
|
+
# Lint/TopLevelReturnWithArgument:
|
2591
|
+
# Enabled: true
|
2592
|
+
|
2593
|
+
# simplify hash acccess that doesn't actually need .dig
|
2594
|
+
Style/SingleArgumentDig:
|
2595
|
+
Enabled: true
|
2596
|
+
|
2597
|
+
# trying to access $2 when there is no $2 will always return nil
|
2598
|
+
Lint/OutOfRangeRegexpRef:
|
2599
|
+
Enabled: true
|
2600
|
+
|
2601
|
+
# simplify how people coerce arrays
|
2602
|
+
Style/ArrayCoercion:
|
2603
|
+
Enabled: true
|
2604
|
+
|
2605
|
+
# if your elseif is the same as your if you're gonna have a bad day
|
2606
|
+
Lint/DuplicateElsifCondition:
|
2607
|
+
Enabled: true
|
2608
|
+
|
2609
|
+
# simplify attr_reader and attr_write into attr_accessor
|
2610
|
+
Style/BisectedAttrAccessor:
|
2611
|
+
Enabled: true
|
2612
|
+
|
2613
|
+
# avoid assignments that aren't needed
|
2614
|
+
Style/RedundantAssignment:
|
2615
|
+
Enabled: true
|
data/config/disable_all.yml
CHANGED
@@ -53,6 +53,8 @@ Layout/EmptyLineAfterGuardClause:
|
|
53
53
|
Enabled: false
|
54
54
|
Layout/EmptyLineAfterMagicComment:
|
55
55
|
Enabled: false
|
56
|
+
Layout/EmptyLineAfterMultilineCondition:
|
57
|
+
Enabled: false
|
56
58
|
Layout/EmptyLineBetweenDefs:
|
57
59
|
Enabled: false
|
58
60
|
Layout/EmptyLinesAroundAccessModifier:
|
@@ -207,6 +209,8 @@ Lint/AssignmentInCondition:
|
|
207
209
|
Enabled: false
|
208
210
|
Lint/BigDecimalNew:
|
209
211
|
Enabled: false
|
212
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
213
|
+
Enabled: false
|
210
214
|
Lint/BooleanSymbol:
|
211
215
|
Enabled: false
|
212
216
|
Lint/CircularArgumentReference:
|
@@ -229,14 +233,22 @@ Lint/DuplicateHashKey:
|
|
229
233
|
Enabled: false
|
230
234
|
Lint/DuplicateMethods:
|
231
235
|
Enabled: false
|
236
|
+
Lint/DuplicateRequire:
|
237
|
+
Enabled: false
|
238
|
+
Lint/DuplicateRescueException:
|
239
|
+
Enabled: false
|
232
240
|
Lint/EachWithObjectArgument:
|
233
241
|
Enabled: false
|
234
242
|
Lint/ElseLayout:
|
235
243
|
Enabled: false
|
244
|
+
Lint/EmptyConditionalBody:
|
245
|
+
Enabled: false
|
236
246
|
Lint/EmptyEnsure:
|
237
247
|
Enabled: false
|
238
248
|
Lint/EmptyExpression:
|
239
249
|
Enabled: false
|
250
|
+
Lint/EmptyFile:
|
251
|
+
Enabled: false
|
240
252
|
Lint/EmptyInterpolation:
|
241
253
|
Enabled: false
|
242
254
|
Lint/EmptyWhen:
|
@@ -247,6 +259,8 @@ Lint/ErbNewArguments:
|
|
247
259
|
Enabled: false
|
248
260
|
Lint/FlipFlop:
|
249
261
|
Enabled: false
|
262
|
+
Lint/FloatComparison:
|
263
|
+
Enabled: false
|
250
264
|
Lint/FloatOutOfRange:
|
251
265
|
Enabled: false
|
252
266
|
Lint/FormatParameterMismatch:
|
@@ -269,6 +283,8 @@ Lint/Loop:
|
|
269
283
|
Enabled: false
|
270
284
|
Lint/MissingCopEnableDirective:
|
271
285
|
Enabled: false
|
286
|
+
Lint/MissingSuper:
|
287
|
+
Enabled: false
|
272
288
|
Lint/MixedRegexpCaptureTypes:
|
273
289
|
Enabled: false
|
274
290
|
Lint/MultipleComparison:
|
@@ -287,6 +303,8 @@ Lint/NumberConversion:
|
|
287
303
|
Enabled: false
|
288
304
|
Lint/OrderedMagicComments:
|
289
305
|
Enabled: false
|
306
|
+
Lint/OutOfRangeRegexpRef:
|
307
|
+
Enabled: false
|
290
308
|
Lint/ParenthesesAsGroupedExpression:
|
291
309
|
Enabled: false
|
292
310
|
Lint/PercentStringArray:
|
@@ -329,6 +347,8 @@ Lint/SafeNavigationWithEmpty:
|
|
329
347
|
Enabled: false
|
330
348
|
Lint/ScriptPermission:
|
331
349
|
Enabled: false
|
350
|
+
Lint/SelfAssignment:
|
351
|
+
Enabled: false
|
332
352
|
Lint/SendWithMixinArgument:
|
333
353
|
Enabled: false
|
334
354
|
Lint/ShadowedArgument:
|
@@ -345,12 +365,18 @@ Lint/Syntax:
|
|
345
365
|
Enabled: false
|
346
366
|
Lint/ToJSON:
|
347
367
|
Enabled: false
|
368
|
+
Lint/TopLevelReturnWithArgument:
|
369
|
+
Enabled: false
|
370
|
+
Lint/TrailingCommaInAttributeDeclaration:
|
371
|
+
Enabled: false
|
348
372
|
Lint/UnderscorePrefixedVariableName:
|
349
373
|
Enabled: false
|
350
374
|
Lint/UnifiedInteger:
|
351
375
|
Enabled: false
|
352
376
|
Lint/UnreachableCode:
|
353
377
|
Enabled: false
|
378
|
+
Lint/UnreachableLoop:
|
379
|
+
Enabled: false
|
354
380
|
Lint/UnusedBlockArgument:
|
355
381
|
Enabled: false
|
356
382
|
Lint/UnusedMethodArgument:
|
@@ -363,10 +389,10 @@ Lint/UselessAccessModifier:
|
|
363
389
|
Enabled: false
|
364
390
|
Lint/UselessAssignment:
|
365
391
|
Enabled: false
|
366
|
-
Lint/UselessComparison:
|
367
|
-
Enabled: false
|
368
392
|
Lint/UselessElseWithoutRescue:
|
369
393
|
Enabled: false
|
394
|
+
Lint/UselessMethodDefinition:
|
395
|
+
Enabled: false
|
370
396
|
Lint/UselessSetterCall:
|
371
397
|
Enabled: false
|
372
398
|
Lint/Void:
|
@@ -461,6 +487,8 @@ Style/ClassCheck:
|
|
461
487
|
Enabled: false
|
462
488
|
Style/ClassMethods:
|
463
489
|
Enabled: false
|
490
|
+
Style/ClassMethodsDefinitions:
|
491
|
+
Enabled: false
|
464
492
|
Style/ClassVars:
|
465
493
|
Enabled: false
|
466
494
|
Style/CollectionMethods:
|
@@ -469,6 +497,8 @@ Style/ColonMethodCall:
|
|
469
497
|
Enabled: false
|
470
498
|
Style/ColonMethodDefinition:
|
471
499
|
Enabled: false
|
500
|
+
Style/CombinableLoops:
|
501
|
+
Enabled: false
|
472
502
|
Style/CommandLiteral:
|
473
503
|
Enabled: false
|
474
504
|
Style/CommentAnnotation:
|
@@ -523,6 +553,8 @@ Style/EvenOdd:
|
|
523
553
|
Enabled: false
|
524
554
|
Style/ExpandPathArguments:
|
525
555
|
Enabled: false
|
556
|
+
Style/ExplicitBlockArgument:
|
557
|
+
Enabled: false
|
526
558
|
Style/ExponentialNotation:
|
527
559
|
Enabled: false
|
528
560
|
Style/FloatDivision:
|
@@ -535,6 +567,8 @@ Style/FormatStringToken:
|
|
535
567
|
Enabled: false
|
536
568
|
Style/FrozenStringLiteralComment:
|
537
569
|
Enabled: false
|
570
|
+
Style/GlobalStdStream:
|
571
|
+
Enabled: false
|
538
572
|
Style/GlobalVars:
|
539
573
|
Enabled: false
|
540
574
|
Style/GuardClause:
|
@@ -571,6 +605,8 @@ Style/InlineComment:
|
|
571
605
|
Enabled: false
|
572
606
|
Style/IpAddresses:
|
573
607
|
Enabled: false
|
608
|
+
Style/KeywordParametersOrder:
|
609
|
+
Enabled: false
|
574
610
|
Style/Lambda:
|
575
611
|
Enabled: false
|
576
612
|
Style/LambdaCall:
|
@@ -587,12 +623,14 @@ Style/RedundantFetchBlock:
|
|
587
623
|
Enabled: false
|
588
624
|
Style/RedundantFileExtensionInRequire:
|
589
625
|
Enabled: false
|
626
|
+
Style/RedundantSelfAssignment:
|
627
|
+
Enabled: false
|
628
|
+
Style/SoleNestedConditional:
|
629
|
+
Enabled: false
|
590
630
|
Style/MethodCalledOnDoEndBlock:
|
591
631
|
Enabled: false
|
592
632
|
Style/MethodDefParentheses:
|
593
633
|
Enabled: false
|
594
|
-
Style/MethodMissingSuper:
|
595
|
-
Enabled: false
|
596
634
|
Style/MinMax:
|
597
635
|
Enabled: false
|
598
636
|
Style/MissingElse:
|
@@ -657,6 +695,8 @@ Style/OptionHash:
|
|
657
695
|
Enabled: false
|
658
696
|
Style/OptionalArguments:
|
659
697
|
Enabled: false
|
698
|
+
Style/OptionalBooleanParameter:
|
699
|
+
Enabled: false
|
660
700
|
Style/ParallelAssignment:
|
661
701
|
Enabled: false
|
662
702
|
Style/ParenthesesAroundCondition:
|
@@ -725,6 +765,8 @@ Style/Send:
|
|
725
765
|
Enabled: false
|
726
766
|
Style/SignalException:
|
727
767
|
Enabled: false
|
768
|
+
Style/SingleArgumentDig:
|
769
|
+
Enabled: false
|
728
770
|
Style/SingleLineBlockParams:
|
729
771
|
Enabled: false
|
730
772
|
Style/SingleLineMethods:
|
@@ -737,6 +779,8 @@ Style/StabbyLambdaParentheses:
|
|
737
779
|
Enabled: false
|
738
780
|
Style/StderrPuts:
|
739
781
|
Enabled: false
|
782
|
+
Style/StringConcatenation:
|
783
|
+
Enabled: false
|
740
784
|
Style/StringHashKeys:
|
741
785
|
Enabled: false
|
742
786
|
Style/StringLiterals:
|
data/config/upstream.yml
CHANGED
@@ -210,9 +210,10 @@ Gemspec/OrderedDependencies:
|
|
210
210
|
- '**/*.gemspec'
|
211
211
|
|
212
212
|
Gemspec/RequiredRubyVersion:
|
213
|
-
Description: 'Checks that `required_ruby_version` of gemspec and `TargetRubyVersion` of .rubocop.yml
|
213
|
+
Description: 'Checks that `required_ruby_version` of gemspec is specified and equal to `TargetRubyVersion` of .rubocop.yml.'
|
214
214
|
Enabled: true
|
215
215
|
VersionAdded: '0.52'
|
216
|
+
VersionChanged: '0.89'
|
216
217
|
Include:
|
217
218
|
- '**/*.gemspec'
|
218
219
|
|
@@ -398,7 +399,6 @@ Layout/DefEndAlignment:
|
|
398
399
|
SupportedStylesAlignWith:
|
399
400
|
- start_of_line
|
400
401
|
- def
|
401
|
-
AutoCorrect: false
|
402
402
|
Severity: warning
|
403
403
|
|
404
404
|
Layout/DotPosition:
|
@@ -435,6 +435,14 @@ Layout/EmptyLineAfterMagicComment:
|
|
435
435
|
Enabled: true
|
436
436
|
VersionAdded: '0.49'
|
437
437
|
|
438
|
+
Layout/EmptyLineAfterMultilineCondition:
|
439
|
+
Description: 'Enforces empty line after multiline condition.'
|
440
|
+
# This is disabled, because this style is not very common in practice.
|
441
|
+
Enabled: false
|
442
|
+
VersionAdded: '0.90'
|
443
|
+
Reference:
|
444
|
+
- https://github.com/airbnb/ruby#multiline-if-newline
|
445
|
+
|
438
446
|
Layout/EmptyLineBetweenDefs:
|
439
447
|
Description: 'Use empty lines between defs.'
|
440
448
|
StyleGuide: '#empty-lines-between-methods'
|
@@ -554,7 +562,6 @@ Layout/EndAlignment:
|
|
554
562
|
- keyword
|
555
563
|
- variable
|
556
564
|
- start_of_line
|
557
|
-
AutoCorrect: false
|
558
565
|
Severity: warning
|
559
566
|
|
560
567
|
Layout/EndOfLine:
|
@@ -1234,7 +1241,7 @@ Layout/SpaceInsideBlockBraces:
|
|
1234
1241
|
|
1235
1242
|
Layout/SpaceInsideHashLiteralBraces:
|
1236
1243
|
Description: "Use spaces inside hash literal braces - or don't."
|
1237
|
-
StyleGuide: '#spaces-
|
1244
|
+
StyleGuide: '#spaces-braces'
|
1238
1245
|
Enabled: true
|
1239
1246
|
VersionAdded: '0.49'
|
1240
1247
|
EnforcedStyle: space
|
@@ -1355,6 +1362,12 @@ Lint/BigDecimalNew:
|
|
1355
1362
|
Enabled: true
|
1356
1363
|
VersionAdded: '0.53'
|
1357
1364
|
|
1365
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
1366
|
+
Description: 'This cop checks for places where binary operator has identical operands.'
|
1367
|
+
Enabled: pending
|
1368
|
+
Safe: false
|
1369
|
+
VersionAdded: '0.89'
|
1370
|
+
|
1358
1371
|
Lint/BooleanSymbol:
|
1359
1372
|
Description: 'Check for `:true` and `:false` symbols.'
|
1360
1373
|
Enabled: true
|
@@ -1420,6 +1433,16 @@ Lint/DuplicateMethods:
|
|
1420
1433
|
Enabled: true
|
1421
1434
|
VersionAdded: '0.29'
|
1422
1435
|
|
1436
|
+
Lint/DuplicateRequire:
|
1437
|
+
Description: 'Check for duplicate `require`s and `require_relative`s.'
|
1438
|
+
Enabled: pending
|
1439
|
+
VersionAdded: '0.90'
|
1440
|
+
|
1441
|
+
Lint/DuplicateRescueException:
|
1442
|
+
Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
|
1443
|
+
Enabled: pending
|
1444
|
+
VersionAdded: '0.89'
|
1445
|
+
|
1423
1446
|
Lint/EachWithObjectArgument:
|
1424
1447
|
Description: 'Check for immutable argument given to each_with_object.'
|
1425
1448
|
Enabled: true
|
@@ -1430,18 +1453,29 @@ Lint/ElseLayout:
|
|
1430
1453
|
Enabled: true
|
1431
1454
|
VersionAdded: '0.17'
|
1432
1455
|
|
1456
|
+
Lint/EmptyConditionalBody:
|
1457
|
+
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
1458
|
+
Enabled: 'pending'
|
1459
|
+
AllowComments: true
|
1460
|
+
VersionAdded: '0.89'
|
1461
|
+
|
1433
1462
|
Lint/EmptyEnsure:
|
1434
1463
|
Description: 'Checks for empty ensure block.'
|
1435
1464
|
Enabled: true
|
1436
1465
|
VersionAdded: '0.10'
|
1437
1466
|
VersionChanged: '0.48'
|
1438
|
-
AutoCorrect: false
|
1439
1467
|
|
1440
1468
|
Lint/EmptyExpression:
|
1441
1469
|
Description: 'Checks for empty expressions.'
|
1442
1470
|
Enabled: true
|
1443
1471
|
VersionAdded: '0.45'
|
1444
1472
|
|
1473
|
+
Lint/EmptyFile:
|
1474
|
+
Description: 'Enforces that Ruby source files are not empty.'
|
1475
|
+
Enabled: pending
|
1476
|
+
AllowComments: true
|
1477
|
+
VersionAdded: '0.90'
|
1478
|
+
|
1445
1479
|
Lint/EmptyInterpolation:
|
1446
1480
|
Description: 'Checks for empty string interpolation.'
|
1447
1481
|
Enabled: true
|
@@ -1473,6 +1507,12 @@ Lint/FlipFlop:
|
|
1473
1507
|
Enabled: true
|
1474
1508
|
VersionAdded: '0.16'
|
1475
1509
|
|
1510
|
+
Lint/FloatComparison:
|
1511
|
+
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
1512
|
+
StyleGuide: '#float-comparison'
|
1513
|
+
Enabled: pending
|
1514
|
+
VersionAdded: '0.89'
|
1515
|
+
|
1476
1516
|
Lint/FloatOutOfRange:
|
1477
1517
|
Description: >-
|
1478
1518
|
Catches floating-point literals too large or small for Ruby to
|
@@ -1520,7 +1560,7 @@ Lint/InheritException:
|
|
1520
1560
|
Lint/InterpolationCheck:
|
1521
1561
|
Description: 'Raise warning for interpolation in single q strs.'
|
1522
1562
|
Enabled: true
|
1523
|
-
|
1563
|
+
Safe: false
|
1524
1564
|
VersionAdded: '0.50'
|
1525
1565
|
VersionChanged: '0.87'
|
1526
1566
|
|
@@ -1542,6 +1582,7 @@ Lint/Loop:
|
|
1542
1582
|
StyleGuide: '#loop-with-break'
|
1543
1583
|
Enabled: true
|
1544
1584
|
VersionAdded: '0.9'
|
1585
|
+
VersionChanged: '0.89'
|
1545
1586
|
|
1546
1587
|
Lint/MissingCopEnableDirective:
|
1547
1588
|
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
@@ -1556,6 +1597,13 @@ Lint/MissingCopEnableDirective:
|
|
1556
1597
|
# .inf for any size
|
1557
1598
|
MaximumRangeSize: .inf
|
1558
1599
|
|
1600
|
+
Lint/MissingSuper:
|
1601
|
+
Description: >-
|
1602
|
+
This cop checks for the presence of constructors and lifecycle callbacks
|
1603
|
+
without calls to `super`'.
|
1604
|
+
Enabled: pending
|
1605
|
+
VersionAdded: '0.89'
|
1606
|
+
|
1559
1607
|
Lint/MixedRegexpCaptureTypes:
|
1560
1608
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
1561
1609
|
Enabled: pending
|
@@ -1608,6 +1656,12 @@ Lint/OrderedMagicComments:
|
|
1608
1656
|
Enabled: true
|
1609
1657
|
VersionAdded: '0.53'
|
1610
1658
|
|
1659
|
+
Lint/OutOfRangeRegexpRef:
|
1660
|
+
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
1661
|
+
Enabled: pending
|
1662
|
+
Safe: false
|
1663
|
+
VersionAdded: '0.89'
|
1664
|
+
|
1611
1665
|
Lint/ParenthesesAsGroupedExpression:
|
1612
1666
|
Description: >-
|
1613
1667
|
Checks for method calls with a space before the opening
|
@@ -1758,6 +1812,11 @@ Lint/ScriptPermission:
|
|
1758
1812
|
VersionAdded: '0.49'
|
1759
1813
|
VersionChanged: '0.50'
|
1760
1814
|
|
1815
|
+
Lint/SelfAssignment:
|
1816
|
+
Description: 'Checks for self-assignments.'
|
1817
|
+
Enabled: pending
|
1818
|
+
VersionAdded: '0.89'
|
1819
|
+
|
1761
1820
|
Lint/SendWithMixinArgument:
|
1762
1821
|
Description: 'Checks for `send` method when using mixin.'
|
1763
1822
|
Enabled: true
|
@@ -1808,6 +1867,16 @@ Lint/ToJSON:
|
|
1808
1867
|
Enabled: true
|
1809
1868
|
VersionAdded: '0.66'
|
1810
1869
|
|
1870
|
+
Lint/TopLevelReturnWithArgument:
|
1871
|
+
Description: 'This cop detects top level return statements with argument.'
|
1872
|
+
Enabled: 'pending'
|
1873
|
+
VersionAdded: '0.89'
|
1874
|
+
|
1875
|
+
Lint/TrailingCommaInAttributeDeclaration:
|
1876
|
+
Description: 'This cop checks for trailing commas in attribute declarations.'
|
1877
|
+
Enabled: pending
|
1878
|
+
VersionAdded: '0.90'
|
1879
|
+
|
1811
1880
|
Lint/UnderscorePrefixedVariableName:
|
1812
1881
|
Description: 'Do not use prefix `_` for a variable that is used.'
|
1813
1882
|
Enabled: true
|
@@ -1824,6 +1893,11 @@ Lint/UnreachableCode:
|
|
1824
1893
|
Enabled: true
|
1825
1894
|
VersionAdded: '0.9'
|
1826
1895
|
|
1896
|
+
Lint/UnreachableLoop:
|
1897
|
+
Description: 'This cop checks for loops that will have at most one iteration.'
|
1898
|
+
Enabled: pending
|
1899
|
+
VersionAdded: '0.89'
|
1900
|
+
|
1827
1901
|
Lint/UnusedBlockArgument:
|
1828
1902
|
Description: 'Checks for unused block arguments.'
|
1829
1903
|
StyleGuide: '#underscore-unused-vars'
|
@@ -1873,16 +1947,18 @@ Lint/UselessAssignment:
|
|
1873
1947
|
Enabled: true
|
1874
1948
|
VersionAdded: '0.11'
|
1875
1949
|
|
1876
|
-
Lint/UselessComparison:
|
1877
|
-
Description: 'Checks for comparison of something with itself.'
|
1878
|
-
Enabled: true
|
1879
|
-
VersionAdded: '0.11'
|
1880
|
-
|
1881
1950
|
Lint/UselessElseWithoutRescue:
|
1882
1951
|
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
1883
1952
|
Enabled: true
|
1884
1953
|
VersionAdded: '0.17'
|
1885
1954
|
|
1955
|
+
Lint/UselessMethodDefinition:
|
1956
|
+
Description: 'Checks for useless method definitions.'
|
1957
|
+
Enabled: pending
|
1958
|
+
VersionAdded: '0.90'
|
1959
|
+
Safe: false
|
1960
|
+
AllowComments: true
|
1961
|
+
|
1886
1962
|
Lint/UselessSetterCall:
|
1887
1963
|
Description: 'Checks for useless setter call to a local variable.'
|
1888
1964
|
Enabled: true
|
@@ -1911,7 +1987,7 @@ Metrics/AbcSize:
|
|
1911
1987
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
1912
1988
|
# a Float.
|
1913
1989
|
IgnoredMethods: []
|
1914
|
-
Max:
|
1990
|
+
Max: 17
|
1915
1991
|
|
1916
1992
|
Metrics/BlockLength:
|
1917
1993
|
Description: 'Avoid long blocks with many lines.'
|
@@ -1993,7 +2069,7 @@ Metrics/PerceivedComplexity:
|
|
1993
2069
|
VersionAdded: '0.25'
|
1994
2070
|
VersionChanged: '0.81'
|
1995
2071
|
IgnoredMethods: []
|
1996
|
-
Max:
|
2072
|
+
Max: 8
|
1997
2073
|
|
1998
2074
|
################## Migration #############################
|
1999
2075
|
|
@@ -2352,6 +2428,7 @@ Style/ArrayCoercion:
|
|
2352
2428
|
Use Array() instead of explicit Array check or [*var], when dealing
|
2353
2429
|
with a variable you want to treat as an Array, but you're not certain it's an array.
|
2354
2430
|
StyleGuide: '#array-coercion'
|
2431
|
+
Safe: false
|
2355
2432
|
Enabled: 'pending'
|
2356
2433
|
VersionAdded: '0.88'
|
2357
2434
|
|
@@ -2527,6 +2604,7 @@ Style/CaseEquality:
|
|
2527
2604
|
StyleGuide: '#no-case-equality'
|
2528
2605
|
Enabled: true
|
2529
2606
|
VersionAdded: '0.9'
|
2607
|
+
VersionChanged: '0.89'
|
2530
2608
|
# If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
|
2531
2609
|
# the case equality operator is a constant.
|
2532
2610
|
#
|
@@ -2541,6 +2619,7 @@ Style/CaseLikeIf:
|
|
2541
2619
|
Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
|
2542
2620
|
StyleGuide: '#case-vs-if-else'
|
2543
2621
|
Enabled: 'pending'
|
2622
|
+
Safe: false
|
2544
2623
|
VersionAdded: '0.88'
|
2545
2624
|
|
2546
2625
|
Style/CharacterLiteral:
|
@@ -2558,7 +2637,6 @@ Style/ClassAndModuleChildren:
|
|
2558
2637
|
# have the knowledge to perform either operation safely and thus requires
|
2559
2638
|
# manual oversight.
|
2560
2639
|
SafeAutoCorrect: false
|
2561
|
-
AutoCorrect: false
|
2562
2640
|
Enabled: true
|
2563
2641
|
VersionAdded: '0.19'
|
2564
2642
|
#
|
@@ -2597,6 +2675,16 @@ Style/ClassMethods:
|
|
2597
2675
|
VersionAdded: '0.9'
|
2598
2676
|
VersionChanged: '0.20'
|
2599
2677
|
|
2678
|
+
Style/ClassMethodsDefinitions:
|
2679
|
+
Description: 'Enforces using `def self.method_name` or `class << self` to define class methods.'
|
2680
|
+
StyleGuide: '#def-self-class-methods'
|
2681
|
+
Enabled: false
|
2682
|
+
VersionAdded: '0.89'
|
2683
|
+
EnforcedStyle: def_self
|
2684
|
+
SupportedStyles:
|
2685
|
+
- def_self
|
2686
|
+
- self_class
|
2687
|
+
|
2600
2688
|
Style/ClassVars:
|
2601
2689
|
Description: 'Avoid the use of class variables.'
|
2602
2690
|
StyleGuide: '#no-class-vars'
|
@@ -2637,6 +2725,14 @@ Style/ColonMethodDefinition:
|
|
2637
2725
|
Enabled: true
|
2638
2726
|
VersionAdded: '0.52'
|
2639
2727
|
|
2728
|
+
Style/CombinableLoops:
|
2729
|
+
Description: >-
|
2730
|
+
Checks for places where multiple consecutive loops over the same data
|
2731
|
+
can be combined into a single loop.
|
2732
|
+
Enabled: pending
|
2733
|
+
Safe: false
|
2734
|
+
VersionAdded: '0.90'
|
2735
|
+
|
2640
2736
|
Style/CommandLiteral:
|
2641
2737
|
Description: 'Use `` or %x around command literals.'
|
2642
2738
|
StyleGuide: '#percent-x'
|
@@ -2880,6 +2976,16 @@ Style/ExpandPathArguments:
|
|
2880
2976
|
Enabled: true
|
2881
2977
|
VersionAdded: '0.53'
|
2882
2978
|
|
2979
|
+
Style/ExplicitBlockArgument:
|
2980
|
+
Description: >-
|
2981
|
+
Consider using explicit block argument to avoid writing block literal
|
2982
|
+
that just passes its arguments to another block.
|
2983
|
+
StyleGuide: '#block-argument'
|
2984
|
+
Enabled: pending
|
2985
|
+
# May change the yielding arity.
|
2986
|
+
Safe: false
|
2987
|
+
VersionAdded: '0.89'
|
2988
|
+
|
2883
2989
|
Style/ExponentialNotation:
|
2884
2990
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
2885
2991
|
StyleGuide: '#exponential-notation'
|
@@ -2961,7 +3067,13 @@ Style/FrozenStringLiteralComment:
|
|
2961
3067
|
# `never` will enforce that the frozen string literal comment does not
|
2962
3068
|
# exist in a file.
|
2963
3069
|
- never
|
2964
|
-
|
3070
|
+
SafeAutoCorrect: false
|
3071
|
+
|
3072
|
+
Style/GlobalStdStream:
|
3073
|
+
Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
|
3074
|
+
StyleGuide: '#global-stdout'
|
3075
|
+
Enabled: pending
|
3076
|
+
VersionAdded: '0.89'
|
2965
3077
|
|
2966
3078
|
Style/GlobalVars:
|
2967
3079
|
Description: 'Do not introduce global variables.'
|
@@ -3035,15 +3147,17 @@ Style/HashSyntax:
|
|
3035
3147
|
PreferHashRocketsForNonAlnumEndingSymbols: false
|
3036
3148
|
|
3037
3149
|
Style/HashTransformKeys:
|
3038
|
-
Description: 'Prefer `transform_keys` over `each_with_object`
|
3150
|
+
Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.'
|
3039
3151
|
Enabled: 'pending'
|
3040
3152
|
VersionAdded: '0.80'
|
3153
|
+
VersionChanged: '0.90'
|
3041
3154
|
Safe: false
|
3042
3155
|
|
3043
3156
|
Style/HashTransformValues:
|
3044
|
-
Description: 'Prefer `transform_values` over `each_with_object`
|
3157
|
+
Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.'
|
3045
3158
|
Enabled: 'pending'
|
3046
3159
|
VersionAdded: '0.80'
|
3160
|
+
VersionChanged: '0.90'
|
3047
3161
|
Safe: false
|
3048
3162
|
|
3049
3163
|
Style/IdenticalConditionalBranches:
|
@@ -3140,6 +3254,12 @@ Style/IpAddresses:
|
|
3140
3254
|
- "::"
|
3141
3255
|
# :: is a valid IPv6 address, but could potentially be legitimately in code
|
3142
3256
|
|
3257
|
+
Style/KeywordParametersOrder:
|
3258
|
+
Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.'
|
3259
|
+
StyleGuide: '#keyword-parameters-order'
|
3260
|
+
Enabled: pending
|
3261
|
+
VersionAdded: '0.90'
|
3262
|
+
|
3143
3263
|
Style/Lambda:
|
3144
3264
|
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
3145
3265
|
StyleGuide: '#lambda-multi-line'
|
@@ -3218,12 +3338,6 @@ Style/MethodDefParentheses:
|
|
3218
3338
|
- require_no_parentheses
|
3219
3339
|
- require_no_parentheses_except_multiline
|
3220
3340
|
|
3221
|
-
Style/MethodMissingSuper:
|
3222
|
-
Description: Checks for `method_missing` to call `super`.
|
3223
|
-
StyleGuide: '#no-method-missing'
|
3224
|
-
Enabled: true
|
3225
|
-
VersionAdded: '0.56'
|
3226
|
-
|
3227
3341
|
Style/MinMax:
|
3228
3342
|
Description: >-
|
3229
3343
|
Use `Enumerable#minmax` instead of `Enumerable#min`
|
@@ -3519,7 +3633,6 @@ Style/NumericPredicate:
|
|
3519
3633
|
# object. Switching these methods has to be done with knowledge of the types
|
3520
3634
|
# of the variables which rubocop doesn't have.
|
3521
3635
|
SafeAutoCorrect: false
|
3522
|
-
AutoCorrect: false
|
3523
3636
|
Enabled: true
|
3524
3637
|
VersionAdded: '0.42'
|
3525
3638
|
VersionChanged: '0.59'
|
@@ -3535,12 +3648,13 @@ Style/NumericPredicate:
|
|
3535
3648
|
|
3536
3649
|
Style/OneLineConditional:
|
3537
3650
|
Description: >-
|
3538
|
-
Favor the ternary operator(?:) over
|
3539
|
-
if/then/else/end constructs.
|
3651
|
+
Favor the ternary operator (?:) or multi-line constructs over
|
3652
|
+
single-line if/then/else/end constructs.
|
3540
3653
|
StyleGuide: '#ternary-operator'
|
3541
3654
|
Enabled: true
|
3655
|
+
AlwaysCorrectToMultiline: false
|
3542
3656
|
VersionAdded: '0.9'
|
3543
|
-
VersionChanged: '0.
|
3657
|
+
VersionChanged: '0.90'
|
3544
3658
|
|
3545
3659
|
Style/OptionHash:
|
3546
3660
|
Description: "Don't use option hashes when you can use keyword arguments."
|
@@ -3565,6 +3679,13 @@ Style/OptionalArguments:
|
|
3565
3679
|
VersionAdded: '0.33'
|
3566
3680
|
VersionChanged: '0.83'
|
3567
3681
|
|
3682
|
+
Style/OptionalBooleanParameter:
|
3683
|
+
Description: 'Use keyword arguments when defining method with boolean argument.'
|
3684
|
+
StyleGuide: '#boolean-keyword-arguments'
|
3685
|
+
Enabled: pending
|
3686
|
+
Safe: false
|
3687
|
+
VersionAdded: '0.89'
|
3688
|
+
|
3568
3689
|
Style/OrAssignment:
|
3569
3690
|
Description: 'Recommend usage of double pipe equals (||=) where applicable.'
|
3570
3691
|
StyleGuide: '#double-pipe-for-uninit'
|
@@ -3764,6 +3885,12 @@ Style/RedundantSelf:
|
|
3764
3885
|
VersionAdded: '0.10'
|
3765
3886
|
VersionChanged: '0.13'
|
3766
3887
|
|
3888
|
+
Style/RedundantSelfAssignment:
|
3889
|
+
Description: 'Checks for places where redundant assignments are made for in place modification methods.'
|
3890
|
+
Enabled: pending
|
3891
|
+
Safe: false
|
3892
|
+
VersionAdded: '0.90'
|
3893
|
+
|
3767
3894
|
Style/RedundantSort:
|
3768
3895
|
Description: >-
|
3769
3896
|
Use `min` instead of `sort.first`,
|
@@ -3883,6 +4010,12 @@ Style/SignalException:
|
|
3883
4010
|
- only_fail
|
3884
4011
|
- semantic
|
3885
4012
|
|
4013
|
+
Style/SingleArgumentDig:
|
4014
|
+
Description: 'Avoid using single argument dig method.'
|
4015
|
+
Enabled: pending
|
4016
|
+
VersionAdded: '0.89'
|
4017
|
+
Safe: false
|
4018
|
+
|
3886
4019
|
Style/SingleLineBlockParams:
|
3887
4020
|
Description: 'Enforces the names of some block params.'
|
3888
4021
|
Enabled: false
|
@@ -3910,6 +4043,14 @@ Style/SlicingWithRange:
|
|
3910
4043
|
VersionAdded: '0.83'
|
3911
4044
|
Safe: false
|
3912
4045
|
|
4046
|
+
Style/SoleNestedConditional:
|
4047
|
+
Description: >-
|
4048
|
+
Finds sole nested conditional nodes
|
4049
|
+
which can be merged into outer conditional node.
|
4050
|
+
Enabled: pending
|
4051
|
+
VersionAdded: '0.89'
|
4052
|
+
AllowModifier: false
|
4053
|
+
|
3913
4054
|
Style/SpecialGlobalVars:
|
3914
4055
|
Description: 'Avoid Perl-style global variables.'
|
3915
4056
|
StyleGuide: '#no-cryptic-perlisms'
|
@@ -3938,6 +4079,13 @@ Style/StderrPuts:
|
|
3938
4079
|
Enabled: true
|
3939
4080
|
VersionAdded: '0.51'
|
3940
4081
|
|
4082
|
+
Style/StringConcatenation:
|
4083
|
+
Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
|
4084
|
+
StyleGuide: '#string-interpolation'
|
4085
|
+
Enabled: pending
|
4086
|
+
Safe: false
|
4087
|
+
VersionAdded: '0.89'
|
4088
|
+
|
3941
4089
|
Style/StringHashKeys:
|
3942
4090
|
Description: 'Prefer symbols instead of strings as hash keys.'
|
3943
4091
|
StyleGuide: '#symbols-as-keys'
|