cookstyle 6.19.11 → 7.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/cookstyle.yml +275 -235
- data/config/disable_all.yml +26 -0
- data/config/upstream.yml +169 -59
- data/cookstyle.gemspec +1 -1
- data/lib/cookstyle/version.rb +2 -2
- data/lib/rubocop/cop/chef/correctness/block_guard_clause_string_only.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/chef_application_fatal.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/conditional_ruby_shellout.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/dnf_package_allow_downgrades.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/incorrect_library_injection.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_default_action.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_notification_timing.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_family_helper.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_family_values_in_case.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_helper.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_platform_values_in_case.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_family_helper.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_value_for_platform_helper.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/invalid_version_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/lazy_eval_node_attribute_defaults.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/lazy_in_resource_guard.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/macos_userdefaults_invalid_type.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/malformed_value_for_platform.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/metadata_missing_name.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/node_normal.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/node_save.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/notifies_action_not_symbol.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/octal_mode_as_string.rb +48 -0
- data/lib/rubocop/cop/chef/correctness/openssl_password_helpers.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/powershell_delete_file.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/property_without_type.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/resource_sets_internal_properties.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/resource_sets_name_property.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/resource_with_none_action.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/scoped_file_exist.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/service_resource.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/supports_must_be_float.rb +1 -1
- data/lib/rubocop/cop/chef/correctness/tmp_path.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/ use_automatic_resource_name.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/cb_depends_on_self.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_handler_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_handler_supports.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_rest.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_rewind.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_shellout.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chef_windows_platform_helper.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chefdk_generators.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/cheffile.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chefspec_coverage_report.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chefspec_legacy_runner.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/chocolatey_package_uninstall_action.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/depends_compat_resource.rb +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_shellout_methods.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_yum_repository_properties.rb +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/deprecation/erl_call.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/execute_path_property.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/execute_relative_creates_without_cwd.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/foodcritic_testing.rb +43 -0
- data/lib/rubocop/cop/chef/deprecation/hwrp_without_provides.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/inherits_compat_resource.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/launchd_deprecated_hash_property.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/legacy_notify_syntax.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/legacy_yum_cookbook_recipes.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/librarian_chefspec.rb +42 -0
- data/lib/rubocop/cop/chef/deprecation/locale_lc_all_property.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/log_resource_notifications.rb +3 -3
- data/lib/rubocop/cop/chef/deprecation/macos_userdefaults_global_property.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/name_property_and_default.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/node_deep_fetch.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/node_methods_not_attributes.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/node_set.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/node_set_unless.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/node_set_without_level.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/partial_search_class_usage.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/partial_search_helper_usage.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/poise_archive.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/powershell_cookbook_helpers.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/resource_overrides_provides_method.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/resource_uses_dsl_name_method.rb +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/deprecation/ruby_27_keyword_argument_warnings.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/ruby_block_create_action.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/run_command_helper.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/search_uses_positional_parameters.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 +47 -0
- data/lib/rubocop/cop/chef/deprecation/user_supports_property.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/verify_property_file_expansion.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/windows_package_installer_type_string.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/windows_task_change_action.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/windows_version_helpers.rb +1 -1
- 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/berksfile.rb +1 -1
- data/lib/rubocop/cop/chef/effortless/chef_vault_used.rb +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/effortless/node_policygroup.rb +1 -1
- data/lib/rubocop/cop/chef/effortless/node_roles.rb +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/modernize/allowed_actions_initializer.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/apt_default_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/berksfile_source.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/build_essential.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/chef_14_resources.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/chef_gem_nokogiri.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/compile_time_resources.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/conditional_using_test.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/cron_d_file_or_template.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/cron_manage_resource.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/databag_helpers.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/default_action_initializer.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/defines_chefspec_matchers.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/definitions.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 +1 -1
- data/lib/rubocop/cop/chef/modernize/empty_resource_initialize.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/execute_apt_update.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/execute_sc_exe.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/execute_sleep.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/execute_sysctl.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/execute_tzutil.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/foodcritic_comments.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/if_provides_default_action.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/includes_mixin_shellout.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/libarchive_file.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/macos_user_defaults.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/minitest_handler_usage.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/node_init_package.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/node_roles_include.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/ohai_default_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/openssl_rsa_key_resource.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/openssl_x509_resource.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/osx_config_profile_resource.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/powershell_expand_archive.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/powershell_guard_interpreter.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/powershell_install_package.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/powershell_install_windowsfeature.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/property_with_name_attribute.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/provides_initializer.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/resource_name_initializer.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/resource_set_or_return.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/resource_with_attributes.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/respond_to_compile_time.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/respond_to_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/respond_to_provides.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/respond_to_resource_name.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/sc_windows_resource.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/seven_zip_archive.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/shell_out_helper.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/shellouts_to_chocolatey.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/simplify_apt_ppa_setup.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/sysctl_param_resource.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/unnecessary_mixlib_shellout_require.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/use_multipackage_installs.rb +17 -13
- data/lib/rubocop/cop/chef/modernize/use_require_relative.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/whyrun_supported_true.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/windows_default_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/modernize/windows_registry_uac.rb +4 -4
- 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 +1 -1
- data/lib/rubocop/cop/chef/redundant/apt_repository_distribution_default.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/apt_repository_notifies_apt_update.rb +1 -1
- 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 +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/redundant/name_property_and_required.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/property_splat_regex.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/property_with_default_and_required.rb +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/redundant/sensitive_property_in_resource.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/string_property_with_nil_default.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/suggests_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/unnecessary_desired_state.rb +13 -12
- data/lib/rubocop/cop/chef/redundant/unnecessary_name_property.rb +1 -1
- data/lib/rubocop/cop/chef/redundant/use_create_if_missing.rb +1 -1
- data/lib/rubocop/cop/chef/sharing/default_maintainer_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/sharing/empty_metadata_field.rb +1 -1
- data/lib/rubocop/cop/chef/sharing/include_property_descriptions.rb +1 -1
- 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 +1 -1
- data/lib/rubocop/cop/chef/sharing/invalid_license_string.rb +1 -1
- data/lib/rubocop/cop/chef/style/attribute_keys.rb +1 -1
- data/lib/rubocop/cop/chef/style/chef_whaaat.rb +1 -1
- data/lib/rubocop/cop/chef/style/comment_sentence_spacing.rb +1 -1
- data/lib/rubocop/cop/chef/style/comments_copyright_format.rb +4 -3
- data/lib/rubocop/cop/chef/style/comments_default_copyright.rb +1 -1
- data/lib/rubocop/cop/chef/style/comments_format.rb +1 -1
- data/lib/rubocop/cop/chef/style/file_mode.rb +1 -1
- data/lib/rubocop/cop/chef/style/immediate_notification_timing.rb +1 -1
- data/lib/rubocop/cop/chef/style/include_recipe_with_parentheses.rb +1 -1
- data/lib/rubocop/cop/chef/style/negating_only_if.rb +1 -1
- data/lib/rubocop/cop/chef/style/overly_complex_supports_depends_metadata.rb +1 -1
- data/lib/rubocop/cop/chef/style/simplify_platform_major_version_check.rb +1 -1
- data/lib/rubocop/cop/chef/style/true_false_resource_properties.rb +1 -1
- data/lib/rubocop/cop/chef/style/unnecessary_os_check.rb +1 -1
- data/lib/rubocop/cop/chef/style/unnecessary_platform_case_statement.rb +1 -1
- data/lib/rubocop/cop/chef/style/use_platform_helpers.rb +1 -1
- data/lib/rubocop/monkey_patches/comment_config.rb +1 -1
- metadata +9 -5
data/config/disable_all.yml
CHANGED
@@ -237,6 +237,8 @@ Lint/DuplicateHashKey:
|
|
237
237
|
Enabled: false
|
238
238
|
Lint/DuplicateMethods:
|
239
239
|
Enabled: false
|
240
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
241
|
+
Enabled: false
|
240
242
|
Lint/DuplicateRequire:
|
241
243
|
Enabled: false
|
242
244
|
Lint/DuplicateRescueException:
|
@@ -245,6 +247,8 @@ Lint/EachWithObjectArgument:
|
|
245
247
|
Enabled: false
|
246
248
|
Lint/ElseLayout:
|
247
249
|
Enabled: false
|
250
|
+
Lint/EmptyBlock:
|
251
|
+
Enabled: false
|
248
252
|
Lint/EmptyConditionalBody:
|
249
253
|
Enabled: false
|
250
254
|
Lint/EmptyEnsure:
|
@@ -269,6 +273,8 @@ Lint/FloatOutOfRange:
|
|
269
273
|
Enabled: false
|
270
274
|
Lint/FormatParameterMismatch:
|
271
275
|
Enabled: false
|
276
|
+
Lint/HashCompareByIdentity:
|
277
|
+
Enabled: false
|
272
278
|
Lint/HeredocMethodCallPosition:
|
273
279
|
Enabled: false
|
274
280
|
Lint/IdentityComparison:
|
@@ -301,6 +307,8 @@ Lint/NestedPercentLiteral:
|
|
301
307
|
Enabled: false
|
302
308
|
Lint/NextWithoutAccumulator:
|
303
309
|
Enabled: false
|
310
|
+
Lint/NoReturnInBeginEndBlocks:
|
311
|
+
Enabled: false
|
304
312
|
Lint/NonDeterministicRequireOrder:
|
305
313
|
Enabled: false
|
306
314
|
Lint/NonLocalExitFromIterator:
|
@@ -327,6 +335,8 @@ Lint/RedundantCopEnableDirective:
|
|
327
335
|
Enabled: false
|
328
336
|
Lint/RedundantRequireStatement:
|
329
337
|
Enabled: false
|
338
|
+
Lint/RedundantSafeNavigation:
|
339
|
+
Enabled: false
|
330
340
|
Lint/RedundantSplatExpansion:
|
331
341
|
Enabled: false
|
332
342
|
Lint/RedundantStringCoercion:
|
@@ -369,6 +379,8 @@ Lint/SuppressedException:
|
|
369
379
|
Enabled: false
|
370
380
|
Lint/Syntax:
|
371
381
|
Enabled: false
|
382
|
+
Lint/ToEnumArguments:
|
383
|
+
Enabled: false
|
372
384
|
Lint/ToJSON:
|
373
385
|
Enabled: false
|
374
386
|
Lint/TopLevelReturnWithArgument:
|
@@ -379,6 +391,8 @@ Lint/UnderscorePrefixedVariableName:
|
|
379
391
|
Enabled: false
|
380
392
|
Lint/UnifiedInteger:
|
381
393
|
Enabled: false
|
394
|
+
Lint/UnmodifiedReduceAccumulator:
|
395
|
+
Enabled: false
|
382
396
|
Lint/UnreachableCode:
|
383
397
|
Enabled: false
|
384
398
|
Lint/UnreachableLoop:
|
@@ -463,6 +477,8 @@ Style/Alias:
|
|
463
477
|
Enabled: false
|
464
478
|
Style/AndOr:
|
465
479
|
Enabled: false
|
480
|
+
Style/ArgumentsForwarding:
|
481
|
+
Enabled: false
|
466
482
|
Style/ArrayCoercion:
|
467
483
|
Enabled: false
|
468
484
|
Style/ArrayJoin:
|
@@ -493,12 +509,16 @@ Style/ClassAndModuleChildren:
|
|
493
509
|
Enabled: false
|
494
510
|
Style/ClassCheck:
|
495
511
|
Enabled: false
|
512
|
+
Style/ClassEqualityComparison:
|
513
|
+
Enabled: false
|
496
514
|
Style/ClassMethods:
|
497
515
|
Enabled: false
|
498
516
|
Style/ClassMethodsDefinitions:
|
499
517
|
Enabled: false
|
500
518
|
Style/ClassVars:
|
501
519
|
Enabled: false
|
520
|
+
Style/CollectionCompact:
|
521
|
+
Enabled: false
|
502
522
|
Style/CollectionMethods:
|
503
523
|
Enabled: false
|
504
524
|
Style/ColonMethodCall:
|
@@ -531,6 +551,8 @@ Style/DocumentationMethod:
|
|
531
551
|
Enabled: false
|
532
552
|
Style/Documentation:
|
533
553
|
Enabled: false
|
554
|
+
Style/DocumentDynamicEvalDefinition:
|
555
|
+
Enabled: false
|
534
556
|
Style/DoubleCopDisableDirective:
|
535
557
|
Enabled: false
|
536
558
|
Style/DoubleNegation:
|
@@ -671,6 +693,8 @@ Style/MutableConstant:
|
|
671
693
|
Enabled: false
|
672
694
|
Style/NegatedIf:
|
673
695
|
Enabled: false
|
696
|
+
Style/NegatedIfElseCondition:
|
697
|
+
Enabled: false
|
674
698
|
Style/NegatedUnless:
|
675
699
|
Enabled: false
|
676
700
|
Style/NegatedWhile:
|
@@ -801,6 +825,8 @@ Style/Strip:
|
|
801
825
|
Enabled: false
|
802
826
|
Style/StructInheritance:
|
803
827
|
Enabled: false
|
828
|
+
Style/SwapValues:
|
829
|
+
Enabled: false
|
804
830
|
Style/SymbolArray:
|
805
831
|
Enabled: false
|
806
832
|
Style/SymbolLiteral:
|
data/config/upstream.yml
CHANGED
@@ -313,7 +313,7 @@ Layout/AssignmentIndentation:
|
|
313
313
|
|
314
314
|
Layout/BeginEndAlignment:
|
315
315
|
Description: 'Align ends corresponding to begins correctly.'
|
316
|
-
Enabled:
|
316
|
+
Enabled: true
|
317
317
|
VersionAdded: '0.91'
|
318
318
|
# The value `start_of_line` means that `end` should be aligned the start of the line
|
319
319
|
# where the `begin` keyword is.
|
@@ -496,7 +496,7 @@ Layout/EmptyLinesAroundArguments:
|
|
496
496
|
Layout/EmptyLinesAroundAttributeAccessor:
|
497
497
|
Description: "Keep blank lines around attribute accessors."
|
498
498
|
StyleGuide: '#empty-lines-around-attribute-accessor'
|
499
|
-
Enabled:
|
499
|
+
Enabled: true
|
500
500
|
VersionAdded: '0.83'
|
501
501
|
VersionChanged: '0.84'
|
502
502
|
AllowAliasSyntax: true
|
@@ -1145,7 +1145,7 @@ Layout/SpaceAroundKeyword:
|
|
1145
1145
|
|
1146
1146
|
Layout/SpaceAroundMethodCallOperator:
|
1147
1147
|
Description: 'Checks method call operators to not have spaces around them.'
|
1148
|
-
Enabled:
|
1148
|
+
Enabled: true
|
1149
1149
|
VersionAdded: '0.82'
|
1150
1150
|
|
1151
1151
|
Layout/SpaceAroundOperators:
|
@@ -1334,8 +1334,8 @@ Layout/TrailingWhitespace:
|
|
1334
1334
|
StyleGuide: '#no-trailing-whitespace'
|
1335
1335
|
Enabled: true
|
1336
1336
|
VersionAdded: '0.49'
|
1337
|
-
VersionChanged: '0
|
1338
|
-
AllowInHeredoc:
|
1337
|
+
VersionChanged: '1.0'
|
1338
|
+
AllowInHeredoc: false
|
1339
1339
|
|
1340
1340
|
#################### Lint ##################################
|
1341
1341
|
### Warnings
|
@@ -1379,7 +1379,7 @@ Lint/BigDecimalNew:
|
|
1379
1379
|
|
1380
1380
|
Lint/BinaryOperatorWithIdenticalOperands:
|
1381
1381
|
Description: 'This cop checks for places where binary operator has identical operands.'
|
1382
|
-
Enabled:
|
1382
|
+
Enabled: true
|
1383
1383
|
Safe: false
|
1384
1384
|
VersionAdded: '0.89'
|
1385
1385
|
|
@@ -1398,7 +1398,7 @@ Lint/CircularArgumentReference:
|
|
1398
1398
|
Lint/ConstantDefinitionInBlock:
|
1399
1399
|
Description: 'Do not define constants within a block.'
|
1400
1400
|
StyleGuide: '#no-constant-definition-in-block'
|
1401
|
-
Enabled:
|
1401
|
+
Enabled: true
|
1402
1402
|
VersionAdded: '0.91'
|
1403
1403
|
|
1404
1404
|
Lint/ConstantResolution:
|
@@ -1423,7 +1423,7 @@ Lint/DeprecatedClassMethods:
|
|
1423
1423
|
|
1424
1424
|
Lint/DeprecatedOpenSSLConstant:
|
1425
1425
|
Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
|
1426
|
-
Enabled:
|
1426
|
+
Enabled: true
|
1427
1427
|
VersionAdded: '0.84'
|
1428
1428
|
|
1429
1429
|
Lint/DisjunctiveAssignmentInConstructor:
|
@@ -1440,7 +1440,7 @@ Lint/DuplicateCaseCondition:
|
|
1440
1440
|
|
1441
1441
|
Lint/DuplicateElsifCondition:
|
1442
1442
|
Description: 'Do not repeat conditions used in if `elsif`.'
|
1443
|
-
Enabled:
|
1443
|
+
Enabled: true
|
1444
1444
|
VersionAdded: '0.88'
|
1445
1445
|
|
1446
1446
|
Lint/DuplicateHashKey:
|
@@ -1454,14 +1454,19 @@ Lint/DuplicateMethods:
|
|
1454
1454
|
Enabled: true
|
1455
1455
|
VersionAdded: '0.29'
|
1456
1456
|
|
1457
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
1458
|
+
Description: 'Checks for duplicate elements in Regexp character classes.'
|
1459
|
+
Enabled: pending
|
1460
|
+
VersionAdded: '1.1'
|
1461
|
+
|
1457
1462
|
Lint/DuplicateRequire:
|
1458
1463
|
Description: 'Check for duplicate `require`s and `require_relative`s.'
|
1459
|
-
Enabled:
|
1464
|
+
Enabled: true
|
1460
1465
|
VersionAdded: '0.90'
|
1461
1466
|
|
1462
1467
|
Lint/DuplicateRescueException:
|
1463
1468
|
Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
|
1464
|
-
Enabled:
|
1469
|
+
Enabled: true
|
1465
1470
|
VersionAdded: '0.89'
|
1466
1471
|
|
1467
1472
|
Lint/EachWithObjectArgument:
|
@@ -1473,10 +1478,17 @@ Lint/ElseLayout:
|
|
1473
1478
|
Description: 'Check for odd code arrangement in an else block.'
|
1474
1479
|
Enabled: true
|
1475
1480
|
VersionAdded: '0.17'
|
1481
|
+
VersionChanged: '1.2'
|
1482
|
+
|
1483
|
+
Lint/EmptyBlock:
|
1484
|
+
Description: 'This cop checks for blocks without a body.'
|
1485
|
+
Enabled: pending
|
1486
|
+
VersionAdded: '1.1'
|
1487
|
+
AllowComments: true
|
1476
1488
|
|
1477
1489
|
Lint/EmptyConditionalBody:
|
1478
1490
|
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
1479
|
-
Enabled:
|
1491
|
+
Enabled: true
|
1480
1492
|
AllowComments: true
|
1481
1493
|
VersionAdded: '0.89'
|
1482
1494
|
|
@@ -1493,7 +1505,7 @@ Lint/EmptyExpression:
|
|
1493
1505
|
|
1494
1506
|
Lint/EmptyFile:
|
1495
1507
|
Description: 'Enforces that Ruby source files are not empty.'
|
1496
|
-
Enabled:
|
1508
|
+
Enabled: true
|
1497
1509
|
AllowComments: true
|
1498
1510
|
VersionAdded: '0.90'
|
1499
1511
|
|
@@ -1531,7 +1543,7 @@ Lint/FlipFlop:
|
|
1531
1543
|
Lint/FloatComparison:
|
1532
1544
|
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
1533
1545
|
StyleGuide: '#float-comparison'
|
1534
|
-
Enabled:
|
1546
|
+
Enabled: true
|
1535
1547
|
VersionAdded: '0.89'
|
1536
1548
|
|
1537
1549
|
Lint/FloatOutOfRange:
|
@@ -1546,6 +1558,13 @@ Lint/FormatParameterMismatch:
|
|
1546
1558
|
Enabled: true
|
1547
1559
|
VersionAdded: '0.33'
|
1548
1560
|
|
1561
|
+
Lint/HashCompareByIdentity:
|
1562
|
+
Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.'
|
1563
|
+
StyleGuide: '#identity-comparison'
|
1564
|
+
Enabled: true
|
1565
|
+
Safe: false
|
1566
|
+
VersionAdded: '0.93'
|
1567
|
+
|
1549
1568
|
Lint/HeredocMethodCallPosition:
|
1550
1569
|
Description: >-
|
1551
1570
|
Checks for the ordering of a method call where
|
@@ -1556,7 +1575,7 @@ Lint/HeredocMethodCallPosition:
|
|
1556
1575
|
|
1557
1576
|
Lint/IdentityComparison:
|
1558
1577
|
Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
|
1559
|
-
Enabled:
|
1578
|
+
Enabled: true
|
1560
1579
|
StyleGuide: '#identity-comparison'
|
1561
1580
|
VersionAdded: '0.91'
|
1562
1581
|
|
@@ -1628,19 +1647,20 @@ Lint/MissingSuper:
|
|
1628
1647
|
Description: >-
|
1629
1648
|
This cop checks for the presence of constructors and lifecycle callbacks
|
1630
1649
|
without calls to `super`'.
|
1631
|
-
Enabled:
|
1650
|
+
Enabled: true
|
1632
1651
|
VersionAdded: '0.89'
|
1633
1652
|
|
1634
1653
|
Lint/MixedRegexpCaptureTypes:
|
1635
1654
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
1636
|
-
Enabled:
|
1655
|
+
Enabled: true
|
1637
1656
|
VersionAdded: '0.85'
|
1638
1657
|
|
1639
1658
|
Lint/MultipleComparison:
|
1640
1659
|
Description: "Use `&&` operator to compare multiple values."
|
1641
1660
|
Enabled: true
|
1642
1661
|
VersionAdded: '0.47'
|
1643
|
-
VersionChanged: '
|
1662
|
+
VersionChanged: '1.1'
|
1663
|
+
AllowMethodComparison: true
|
1644
1664
|
|
1645
1665
|
Lint/NestedMethodDefinition:
|
1646
1666
|
Description: 'Do not use nested method definitions.'
|
@@ -1660,6 +1680,11 @@ Lint/NextWithoutAccumulator:
|
|
1660
1680
|
Enabled: true
|
1661
1681
|
VersionAdded: '0.36'
|
1662
1682
|
|
1683
|
+
Lint/NoReturnInBeginEndBlocks:
|
1684
|
+
Description: 'Do not `return` inside `begin..end` blocks in assignment contexts.'
|
1685
|
+
Enabled: pending
|
1686
|
+
VersionAdded: '1.2'
|
1687
|
+
|
1663
1688
|
Lint/NonDeterministicRequireOrder:
|
1664
1689
|
Description: 'Always sort arrays returned by Dir.glob when requiring files.'
|
1665
1690
|
Enabled: true
|
@@ -1675,8 +1700,12 @@ Lint/NumberConversion:
|
|
1675
1700
|
Description: 'Checks unsafe usage of number conversion methods.'
|
1676
1701
|
Enabled: false
|
1677
1702
|
VersionAdded: '0.53'
|
1678
|
-
VersionChanged: '
|
1703
|
+
VersionChanged: '1.1'
|
1679
1704
|
SafeAutoCorrect: false
|
1705
|
+
IgnoredMethods: []
|
1706
|
+
IgnoredClasses:
|
1707
|
+
- Time
|
1708
|
+
- DateTime
|
1680
1709
|
|
1681
1710
|
Lint/OrderedMagicComments:
|
1682
1711
|
Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
|
@@ -1685,7 +1714,7 @@ Lint/OrderedMagicComments:
|
|
1685
1714
|
|
1686
1715
|
Lint/OutOfRangeRegexpRef:
|
1687
1716
|
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
1688
|
-
Enabled:
|
1717
|
+
Enabled: true
|
1689
1718
|
Safe: false
|
1690
1719
|
VersionAdded: '0.89'
|
1691
1720
|
|
@@ -1714,7 +1743,7 @@ Lint/PercentSymbolArray:
|
|
1714
1743
|
Lint/RaiseException:
|
1715
1744
|
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
1716
1745
|
StyleGuide: '#raise-exception'
|
1717
|
-
Enabled:
|
1746
|
+
Enabled: true
|
1718
1747
|
Safe: false
|
1719
1748
|
VersionAdded: '0.81'
|
1720
1749
|
VersionChanged: '0.86'
|
@@ -1746,6 +1775,19 @@ Lint/RedundantRequireStatement:
|
|
1746
1775
|
Enabled: true
|
1747
1776
|
VersionAdded: '0.76'
|
1748
1777
|
|
1778
|
+
Lint/RedundantSafeNavigation:
|
1779
|
+
Description: 'Checks for redundant safe navigation calls.'
|
1780
|
+
Enabled: true
|
1781
|
+
VersionAdded: '0.93'
|
1782
|
+
AllowedMethods:
|
1783
|
+
- instance_of?
|
1784
|
+
- kind_of?
|
1785
|
+
- is_a?
|
1786
|
+
- eql?
|
1787
|
+
- respond_to?
|
1788
|
+
- equal?
|
1789
|
+
Safe: false
|
1790
|
+
|
1749
1791
|
Lint/RedundantSplatExpansion:
|
1750
1792
|
Description: 'Checks for splat unnecessarily being called on literals.'
|
1751
1793
|
Enabled: true
|
@@ -1842,7 +1884,7 @@ Lint/ScriptPermission:
|
|
1842
1884
|
|
1843
1885
|
Lint/SelfAssignment:
|
1844
1886
|
Description: 'Checks for self-assignments.'
|
1845
|
-
Enabled:
|
1887
|
+
Enabled: true
|
1846
1888
|
VersionAdded: '0.89'
|
1847
1889
|
|
1848
1890
|
Lint/SendWithMixinArgument:
|
@@ -1873,7 +1915,7 @@ Lint/ShadowingOuterLocalVariable:
|
|
1873
1915
|
|
1874
1916
|
Lint/StructNewOverride:
|
1875
1917
|
Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
|
1876
|
-
Enabled:
|
1918
|
+
Enabled: true
|
1877
1919
|
VersionAdded: '0.81'
|
1878
1920
|
|
1879
1921
|
Lint/SuppressedException:
|
@@ -1890,6 +1932,11 @@ Lint/Syntax:
|
|
1890
1932
|
VersionAdded: '0.9'
|
1891
1933
|
|
1892
1934
|
|
1935
|
+
Lint/ToEnumArguments:
|
1936
|
+
Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
|
1937
|
+
Enabled: pending
|
1938
|
+
VersionAdded: '1.1'
|
1939
|
+
|
1893
1940
|
Lint/ToJSON:
|
1894
1941
|
Description: 'Ensure #to_json includes an optional argument.'
|
1895
1942
|
Enabled: true
|
@@ -1897,12 +1944,12 @@ Lint/ToJSON:
|
|
1897
1944
|
|
1898
1945
|
Lint/TopLevelReturnWithArgument:
|
1899
1946
|
Description: 'This cop detects top level return statements with argument.'
|
1900
|
-
Enabled:
|
1947
|
+
Enabled: true
|
1901
1948
|
VersionAdded: '0.89'
|
1902
1949
|
|
1903
1950
|
Lint/TrailingCommaInAttributeDeclaration:
|
1904
1951
|
Description: 'This cop checks for trailing commas in attribute declarations.'
|
1905
|
-
Enabled:
|
1952
|
+
Enabled: true
|
1906
1953
|
VersionAdded: '0.90'
|
1907
1954
|
|
1908
1955
|
Lint/UnderscorePrefixedVariableName:
|
@@ -1916,6 +1963,11 @@ Lint/UnifiedInteger:
|
|
1916
1963
|
Enabled: true
|
1917
1964
|
VersionAdded: '0.43'
|
1918
1965
|
|
1966
|
+
Lint/UnmodifiedReduceAccumulator:
|
1967
|
+
Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
|
1968
|
+
Enabled: pending
|
1969
|
+
VersionAdded: '1.1'
|
1970
|
+
|
1919
1971
|
Lint/UnreachableCode:
|
1920
1972
|
Description: 'Unreachable code.'
|
1921
1973
|
Enabled: true
|
@@ -1923,7 +1975,7 @@ Lint/UnreachableCode:
|
|
1923
1975
|
|
1924
1976
|
Lint/UnreachableLoop:
|
1925
1977
|
Description: 'This cop checks for loops that will have at most one iteration.'
|
1926
|
-
Enabled:
|
1978
|
+
Enabled: true
|
1927
1979
|
VersionAdded: '0.89'
|
1928
1980
|
|
1929
1981
|
Lint/UnusedBlockArgument:
|
@@ -1982,7 +2034,7 @@ Lint/UselessElseWithoutRescue:
|
|
1982
2034
|
|
1983
2035
|
Lint/UselessMethodDefinition:
|
1984
2036
|
Description: 'Checks for useless method definitions.'
|
1985
|
-
Enabled:
|
2037
|
+
Enabled: true
|
1986
2038
|
VersionAdded: '0.90'
|
1987
2039
|
Safe: false
|
1988
2040
|
AllowComments: true
|
@@ -1990,13 +2042,14 @@ Lint/UselessMethodDefinition:
|
|
1990
2042
|
Lint/UselessSetterCall:
|
1991
2043
|
Description: 'Checks for useless setter call to a local variable.'
|
1992
2044
|
Enabled: true
|
2045
|
+
SafeAutoCorrect: false
|
1993
2046
|
VersionAdded: '0.13'
|
1994
|
-
VersionChanged: '
|
2047
|
+
VersionChanged: '1.2'
|
1995
2048
|
Safe: false
|
1996
2049
|
|
1997
2050
|
Lint/UselessTimes:
|
1998
2051
|
Description: 'Checks for useless `Integer#times` calls.'
|
1999
|
-
Enabled:
|
2052
|
+
Enabled: true
|
2000
2053
|
VersionAdded: '0.91'
|
2001
2054
|
Safe: false
|
2002
2055
|
|
@@ -2135,6 +2188,7 @@ Naming/BinaryOperatorParameterName:
|
|
2135
2188
|
StyleGuide: '#other-arg'
|
2136
2189
|
Enabled: true
|
2137
2190
|
VersionAdded: '0.50'
|
2191
|
+
VersionChanged: '1.2'
|
2138
2192
|
|
2139
2193
|
Naming/BlockParameterName:
|
2140
2194
|
Description: >-
|
@@ -2241,6 +2295,7 @@ Naming/HeredocDelimiterCase:
|
|
2241
2295
|
StyleGuide: '#heredoc-delimiters'
|
2242
2296
|
Enabled: true
|
2243
2297
|
VersionAdded: '0.50'
|
2298
|
+
VersionChanged: '1.2'
|
2244
2299
|
EnforcedStyle: uppercase
|
2245
2300
|
SupportedStyles:
|
2246
2301
|
- lowercase
|
@@ -2259,7 +2314,7 @@ Naming/MemoizedInstanceVariableName:
|
|
2259
2314
|
Memoized method name should match memo instance variable name.
|
2260
2315
|
Enabled: true
|
2261
2316
|
VersionAdded: '0.53'
|
2262
|
-
VersionChanged: '
|
2317
|
+
VersionChanged: '1.2'
|
2263
2318
|
EnforcedStyleForLeadingUnderscores: disallowed
|
2264
2319
|
SupportedStylesForLeadingUnderscores:
|
2265
2320
|
- disallowed
|
@@ -2357,14 +2412,18 @@ Naming/VariableName:
|
|
2357
2412
|
- camelCase
|
2358
2413
|
|
2359
2414
|
Naming/VariableNumber:
|
2360
|
-
Description: 'Use the configured style when numbering variables.'
|
2415
|
+
Description: 'Use the configured style when numbering symbols, methods and variables.'
|
2416
|
+
StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
|
2361
2417
|
Enabled: true
|
2362
2418
|
VersionAdded: '0.50'
|
2419
|
+
VersionChanged: '1.2'
|
2363
2420
|
EnforcedStyle: normalcase
|
2364
2421
|
SupportedStyles:
|
2365
2422
|
- snake_case
|
2366
2423
|
- normalcase
|
2367
2424
|
- non_integer
|
2425
|
+
CheckMethodNames: true
|
2426
|
+
CheckSymbols: true
|
2368
2427
|
|
2369
2428
|
#################### Security ##############################
|
2370
2429
|
|
@@ -2395,9 +2454,10 @@ Security/MarshalLoad:
|
|
2395
2454
|
VersionAdded: '0.47'
|
2396
2455
|
|
2397
2456
|
Security/Open:
|
2398
|
-
Description: 'The use of Kernel#open
|
2457
|
+
Description: 'The use of `Kernel#open` and `URI.open` represent a serious security risk.'
|
2399
2458
|
Enabled: true
|
2400
2459
|
VersionAdded: '0.53'
|
2460
|
+
VersionChanged: '1.0'
|
2401
2461
|
Safe: false
|
2402
2462
|
|
2403
2463
|
Security/YAMLLoad:
|
@@ -2424,7 +2484,7 @@ Style/AccessModifierDeclarations:
|
|
2424
2484
|
|
2425
2485
|
Style/AccessorGrouping:
|
2426
2486
|
Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
|
2427
|
-
Enabled:
|
2487
|
+
Enabled: true
|
2428
2488
|
VersionAdded: '0.87'
|
2429
2489
|
EnforcedStyle: grouped
|
2430
2490
|
SupportedStyles:
|
@@ -2457,6 +2517,13 @@ Style/AndOr:
|
|
2457
2517
|
- always
|
2458
2518
|
- conditionals
|
2459
2519
|
|
2520
|
+
Style/ArgumentsForwarding:
|
2521
|
+
Description: 'Use arguments forwarding.'
|
2522
|
+
StyleGuide: '#arguments-forwarding'
|
2523
|
+
Enabled: pending
|
2524
|
+
AllowOnlyRestArgument: true
|
2525
|
+
VersionAdded: '1.1'
|
2526
|
+
|
2460
2527
|
Style/ArrayCoercion:
|
2461
2528
|
Description: >-
|
2462
2529
|
Use Array() instead of explicit Array check or [*var], when dealing
|
@@ -2513,7 +2580,7 @@ Style/BisectedAttrAccessor:
|
|
2513
2580
|
Description: >-
|
2514
2581
|
Checks for places where `attr_reader` and `attr_writer`
|
2515
2582
|
for the same method can be combined into single `attr_accessor`.
|
2516
|
-
Enabled:
|
2583
|
+
Enabled: true
|
2517
2584
|
VersionAdded: '0.87'
|
2518
2585
|
|
2519
2586
|
Style/BlockComments:
|
@@ -2652,7 +2719,7 @@ Style/CaseEquality:
|
|
2652
2719
|
Style/CaseLikeIf:
|
2653
2720
|
Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
|
2654
2721
|
StyleGuide: '#case-vs-if-else'
|
2655
|
-
Enabled:
|
2722
|
+
Enabled: true
|
2656
2723
|
Safe: false
|
2657
2724
|
VersionAdded: '0.88'
|
2658
2725
|
|
@@ -2702,6 +2769,16 @@ Style/ClassCheck:
|
|
2702
2769
|
- is_a?
|
2703
2770
|
- kind_of?
|
2704
2771
|
|
2772
|
+
Style/ClassEqualityComparison:
|
2773
|
+
Description: 'Enforces the use of `Object#instance_of?` instead of class comparison for equality.'
|
2774
|
+
StyleGuide: '#instance-of-vs-class-comparison'
|
2775
|
+
Enabled: true
|
2776
|
+
VersionAdded: '0.93'
|
2777
|
+
IgnoredMethods:
|
2778
|
+
- ==
|
2779
|
+
- equal?
|
2780
|
+
- eql?
|
2781
|
+
|
2705
2782
|
Style/ClassMethods:
|
2706
2783
|
Description: 'Use self when defining module/class methods.'
|
2707
2784
|
StyleGuide: '#def-self-class-methods'
|
@@ -2725,6 +2802,11 @@ Style/ClassVars:
|
|
2725
2802
|
Enabled: true
|
2726
2803
|
VersionAdded: '0.13'
|
2727
2804
|
|
2805
|
+
Style/CollectionCompact:
|
2806
|
+
Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.'
|
2807
|
+
Enabled: pending
|
2808
|
+
VersionAdded: '1.2'
|
2809
|
+
|
2728
2810
|
# Align with the style guide.
|
2729
2811
|
Style/CollectionMethods:
|
2730
2812
|
Description: 'Preferred collection methods.'
|
@@ -2763,7 +2845,7 @@ Style/CombinableLoops:
|
|
2763
2845
|
Description: >-
|
2764
2846
|
Checks for places where multiple consecutive loops over the same data
|
2765
2847
|
can be combined into a single loop.
|
2766
|
-
Enabled:
|
2848
|
+
Enabled: true
|
2767
2849
|
Safe: false
|
2768
2850
|
VersionAdded: '0.90'
|
2769
2851
|
|
@@ -2887,6 +2969,14 @@ Style/DisableCopsWithinSourceCodeDirective:
|
|
2887
2969
|
Enabled: false
|
2888
2970
|
VersionAdded: '0.82'
|
2889
2971
|
|
2972
|
+
Style/DocumentDynamicEvalDefinition:
|
2973
|
+
Description: >-
|
2974
|
+
When using `class_eval` (or other `eval`) with string interpolation,
|
2975
|
+
add a comment block showing its appearance if interpolated.
|
2976
|
+
StyleGuide: '#eval-comment-docs'
|
2977
|
+
Enabled: pending
|
2978
|
+
VersionAdded: '1.1'
|
2979
|
+
|
2890
2980
|
Style/Documentation:
|
2891
2981
|
Description: 'Document classes and non-namespace modules.'
|
2892
2982
|
Enabled: true
|
@@ -2914,7 +3004,7 @@ Style/DoubleNegation:
|
|
2914
3004
|
StyleGuide: '#no-bang-bang'
|
2915
3005
|
Enabled: true
|
2916
3006
|
VersionAdded: '0.19'
|
2917
|
-
VersionChanged: '
|
3007
|
+
VersionChanged: '1.2'
|
2918
3008
|
EnforcedStyle: allowed_in_returns
|
2919
3009
|
SafeAutoCorrect: false
|
2920
3010
|
SupportedStyles:
|
@@ -3016,7 +3106,7 @@ Style/ExplicitBlockArgument:
|
|
3016
3106
|
Consider using explicit block argument to avoid writing block literal
|
3017
3107
|
that just passes its arguments to another block.
|
3018
3108
|
StyleGuide: '#block-argument'
|
3019
|
-
Enabled:
|
3109
|
+
Enabled: true
|
3020
3110
|
# May change the yielding arity.
|
3021
3111
|
Safe: false
|
3022
3112
|
VersionAdded: '0.89'
|
@@ -3024,7 +3114,7 @@ Style/ExplicitBlockArgument:
|
|
3024
3114
|
Style/ExponentialNotation:
|
3025
3115
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
3026
3116
|
StyleGuide: '#exponential-notation'
|
3027
|
-
Enabled:
|
3117
|
+
Enabled: true
|
3028
3118
|
VersionAdded: '0.82'
|
3029
3119
|
EnforcedStyle: scientific
|
3030
3120
|
SupportedStyles:
|
@@ -3079,8 +3169,12 @@ Style/FormatStringToken:
|
|
3079
3169
|
# Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
|
3080
3170
|
- template
|
3081
3171
|
- unannotated
|
3172
|
+
# `MaxUnannotatedPlaceholdersAllowed` defines the number of `unannotated`
|
3173
|
+
# style token in a format string to be allowed when enforced style is not
|
3174
|
+
# `unannotated`.
|
3175
|
+
MaxUnannotatedPlaceholdersAllowed: 1
|
3082
3176
|
VersionAdded: '0.49'
|
3083
|
-
VersionChanged: '0
|
3177
|
+
VersionChanged: '1.0'
|
3084
3178
|
|
3085
3179
|
Style/FrozenStringLiteralComment:
|
3086
3180
|
Description: >-
|
@@ -3107,7 +3201,7 @@ Style/FrozenStringLiteralComment:
|
|
3107
3201
|
Style/GlobalStdStream:
|
3108
3202
|
Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
|
3109
3203
|
StyleGuide: '#global-stdout'
|
3110
|
-
Enabled:
|
3204
|
+
Enabled: true
|
3111
3205
|
VersionAdded: '0.89'
|
3112
3206
|
SafeAutoCorrect: false
|
3113
3207
|
|
@@ -3135,7 +3229,7 @@ Style/HashAsLastArrayItem:
|
|
3135
3229
|
Checks for presence or absence of braces around hash literal as a last
|
3136
3230
|
array item depending on configuration.
|
3137
3231
|
StyleGuide: '#hash-literal-as-last-array-item'
|
3138
|
-
Enabled:
|
3232
|
+
Enabled: true
|
3139
3233
|
VersionAdded: '0.88'
|
3140
3234
|
EnforcedStyle: braces
|
3141
3235
|
SupportedStyles:
|
@@ -3145,7 +3239,7 @@ Style/HashAsLastArrayItem:
|
|
3145
3239
|
Style/HashEachMethods:
|
3146
3240
|
Description: 'Use Hash#each_key and Hash#each_value.'
|
3147
3241
|
StyleGuide: '#hash-each'
|
3148
|
-
Enabled:
|
3242
|
+
Enabled: true
|
3149
3243
|
VersionAdded: '0.80'
|
3150
3244
|
Safe: false
|
3151
3245
|
|
@@ -3153,7 +3247,7 @@ Style/HashLikeCase:
|
|
3153
3247
|
Description: >-
|
3154
3248
|
Checks for places where `case-when` represents a simple 1:1
|
3155
3249
|
mapping and can be replaced with a hash lookup.
|
3156
|
-
Enabled:
|
3250
|
+
Enabled: true
|
3157
3251
|
VersionAdded: '0.88'
|
3158
3252
|
# `MinBranchesCount` defines the number of branches `case` needs to have
|
3159
3253
|
# to trigger this cop
|
@@ -3184,14 +3278,14 @@ Style/HashSyntax:
|
|
3184
3278
|
|
3185
3279
|
Style/HashTransformKeys:
|
3186
3280
|
Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.'
|
3187
|
-
Enabled:
|
3281
|
+
Enabled: true
|
3188
3282
|
VersionAdded: '0.80'
|
3189
3283
|
VersionChanged: '0.90'
|
3190
3284
|
Safe: false
|
3191
3285
|
|
3192
3286
|
Style/HashTransformValues:
|
3193
3287
|
Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.'
|
3194
|
-
Enabled:
|
3288
|
+
Enabled: true
|
3195
3289
|
VersionAdded: '0.80'
|
3196
3290
|
VersionChanged: '0.90'
|
3197
3291
|
Safe: false
|
@@ -3298,7 +3392,7 @@ Style/IpAddresses:
|
|
3298
3392
|
Style/KeywordParametersOrder:
|
3299
3393
|
Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.'
|
3300
3394
|
StyleGuide: '#keyword-parameters-order'
|
3301
|
-
Enabled:
|
3395
|
+
Enabled: true
|
3302
3396
|
VersionAdded: '0.90'
|
3303
3397
|
|
3304
3398
|
Style/Lambda:
|
@@ -3500,6 +3594,7 @@ Style/MultipleComparison:
|
|
3500
3594
|
use Array#include? instead.
|
3501
3595
|
Enabled: true
|
3502
3596
|
VersionAdded: '0.49'
|
3597
|
+
VersionChanged: '1.1'
|
3503
3598
|
|
3504
3599
|
Style/MutableConstant:
|
3505
3600
|
Description: 'Do not assign mutable objects to constants.'
|
@@ -3534,6 +3629,13 @@ Style/NegatedIf:
|
|
3534
3629
|
- prefix
|
3535
3630
|
- postfix
|
3536
3631
|
|
3632
|
+
Style/NegatedIfElseCondition:
|
3633
|
+
Description: >-
|
3634
|
+
This cop checks for uses of `if-else` and ternary operators with a negated condition
|
3635
|
+
which can be simplified by inverting condition and swapping branches.
|
3636
|
+
Enabled: pending
|
3637
|
+
VersionAdded: '1.2'
|
3638
|
+
|
3537
3639
|
Style/NegatedUnless:
|
3538
3640
|
Description: 'Favor if over unless for negative conditions.'
|
3539
3641
|
StyleGuide: '#if-for-negatives'
|
@@ -3723,7 +3825,7 @@ Style/OptionalArguments:
|
|
3723
3825
|
Style/OptionalBooleanParameter:
|
3724
3826
|
Description: 'Use keyword arguments when defining method with boolean argument.'
|
3725
3827
|
StyleGuide: '#boolean-keyword-arguments'
|
3726
|
-
Enabled:
|
3828
|
+
Enabled: true
|
3727
3829
|
Safe: false
|
3728
3830
|
VersionAdded: '0.89'
|
3729
3831
|
AllowedMethods:
|
@@ -3811,11 +3913,12 @@ Style/RaiseArgs:
|
|
3811
3913
|
StyleGuide: '#exception-class-messages'
|
3812
3914
|
Enabled: true
|
3813
3915
|
VersionAdded: '0.14'
|
3814
|
-
VersionChanged: '
|
3916
|
+
VersionChanged: '1.2'
|
3815
3917
|
EnforcedStyle: exploded
|
3816
3918
|
SupportedStyles:
|
3817
3919
|
- compact # raise Exception.new(msg)
|
3818
3920
|
- exploded # raise Exception, msg
|
3921
|
+
AllowedCompactTypes: []
|
3819
3922
|
|
3820
3923
|
Style/RandomWithOffset:
|
3821
3924
|
Description: >-
|
@@ -3827,7 +3930,7 @@ Style/RandomWithOffset:
|
|
3827
3930
|
|
3828
3931
|
Style/RedundantAssignment:
|
3829
3932
|
Description: 'Checks for redundant assignment before returning.'
|
3830
|
-
Enabled:
|
3933
|
+
Enabled: true
|
3831
3934
|
VersionAdded: '0.87'
|
3832
3935
|
|
3833
3936
|
Style/RedundantBegin:
|
@@ -3864,7 +3967,7 @@ Style/RedundantFetchBlock:
|
|
3864
3967
|
Use `fetch(key, value)` instead of `fetch(key) { value }`
|
3865
3968
|
when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
|
3866
3969
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
|
3867
|
-
Enabled:
|
3970
|
+
Enabled: true
|
3868
3971
|
Safe: false
|
3869
3972
|
# If enabled, this cop will autocorrect usages of
|
3870
3973
|
# `fetch` being called with block returning a constant.
|
@@ -3877,7 +3980,7 @@ Style/RedundantFileExtensionInRequire:
|
|
3877
3980
|
Checks for the presence of superfluous `.rb` extension in
|
3878
3981
|
the filename provided to `require` and `require_relative`.
|
3879
3982
|
StyleGuide: '#no-explicit-rb-to-require'
|
3880
|
-
Enabled:
|
3983
|
+
Enabled: true
|
3881
3984
|
VersionAdded: '0.88'
|
3882
3985
|
|
3883
3986
|
Style/RedundantFreeze:
|
@@ -3904,12 +4007,12 @@ Style/RedundantPercentQ:
|
|
3904
4007
|
|
3905
4008
|
Style/RedundantRegexpCharacterClass:
|
3906
4009
|
Description: 'Checks for unnecessary single-element Regexp character classes.'
|
3907
|
-
Enabled:
|
4010
|
+
Enabled: true
|
3908
4011
|
VersionAdded: '0.85'
|
3909
4012
|
|
3910
4013
|
Style/RedundantRegexpEscape:
|
3911
4014
|
Description: 'Checks for redundant escapes in Regexps.'
|
3912
|
-
Enabled:
|
4015
|
+
Enabled: true
|
3913
4016
|
VersionAdded: '0.85'
|
3914
4017
|
|
3915
4018
|
Style/RedundantReturn:
|
@@ -3930,7 +4033,7 @@ Style/RedundantSelf:
|
|
3930
4033
|
|
3931
4034
|
Style/RedundantSelfAssignment:
|
3932
4035
|
Description: 'Checks for places where redundant assignments are made for in place modification methods.'
|
3933
|
-
Enabled:
|
4036
|
+
Enabled: true
|
3934
4037
|
Safe: false
|
3935
4038
|
VersionAdded: '0.90'
|
3936
4039
|
|
@@ -4058,7 +4161,7 @@ Style/SignalException:
|
|
4058
4161
|
|
4059
4162
|
Style/SingleArgumentDig:
|
4060
4163
|
Description: 'Avoid using single argument dig method.'
|
4061
|
-
Enabled:
|
4164
|
+
Enabled: true
|
4062
4165
|
VersionAdded: '0.89'
|
4063
4166
|
Safe: false
|
4064
4167
|
|
@@ -4085,7 +4188,7 @@ Style/SingleLineMethods:
|
|
4085
4188
|
|
4086
4189
|
Style/SlicingWithRange:
|
4087
4190
|
Description: 'Checks array slicing is done with endless ranges when suitable.'
|
4088
|
-
Enabled:
|
4191
|
+
Enabled: true
|
4089
4192
|
VersionAdded: '0.83'
|
4090
4193
|
Safe: false
|
4091
4194
|
|
@@ -4093,7 +4196,7 @@ Style/SoleNestedConditional:
|
|
4093
4196
|
Description: >-
|
4094
4197
|
Finds sole nested conditional nodes
|
4095
4198
|
which can be merged into outer conditional node.
|
4096
|
-
Enabled:
|
4199
|
+
Enabled: true
|
4097
4200
|
VersionAdded: '0.89'
|
4098
4201
|
AllowModifier: false
|
4099
4202
|
|
@@ -4128,7 +4231,7 @@ Style/StderrPuts:
|
|
4128
4231
|
Style/StringConcatenation:
|
4129
4232
|
Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
|
4130
4233
|
StyleGuide: '#string-interpolation'
|
4131
|
-
Enabled:
|
4234
|
+
Enabled: true
|
4132
4235
|
Safe: false
|
4133
4236
|
VersionAdded: '0.89'
|
4134
4237
|
|
@@ -4191,6 +4294,13 @@ Style/StructInheritance:
|
|
4191
4294
|
VersionAdded: '0.29'
|
4192
4295
|
VersionChanged: '0.86'
|
4193
4296
|
|
4297
|
+
Style/SwapValues:
|
4298
|
+
Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.'
|
4299
|
+
StyleGuide: '#values-swapping'
|
4300
|
+
Enabled: pending
|
4301
|
+
VersionAdded: '1.1'
|
4302
|
+
SafeAutoCorrect: false
|
4303
|
+
|
4194
4304
|
Style/SymbolArray:
|
4195
4305
|
Description: 'Use %i or %I for arrays of symbols.'
|
4196
4306
|
StyleGuide: '#percent-i'
|