cookstyle 6.19.5 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -1
- data/config/cookstyle.yml +254 -235
- data/config/disable_all.yml +20 -0
- data/config/upstream.yml +138 -54
- 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 +2 -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 +2 -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 +2 -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 +2 -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 +2 -1
- data/lib/rubocop/cop/chef/correctness/node_normal_unless.rb +2 -1
- data/lib/rubocop/cop/chef/correctness/node_save.rb +2 -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 +2 -2
- data/lib/rubocop/cop/chef/deprecation/chef_windows_platform_helper.rb +2 -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 -3
- data/lib/rubocop/cop/chef/deprecation/deprecated_mixins.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/deprecated_platform_methods.rb +2 -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/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 +2 -2
- data/lib/rubocop/cop/chef/deprecation/legacy_yum_cookbook_recipes.rb +1 -1
- 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 +3 -1
- data/lib/rubocop/cop/chef/deprecation/node_methods_not_attributes.rb +22 -27
- data/lib/rubocop/cop/chef/deprecation/node_set.rb +2 -1
- data/lib/rubocop/cop/chef/deprecation/node_set_unless.rb +2 -1
- data/lib/rubocop/cop/chef/deprecation/node_set_without_level.rb +2 -1
- data/lib/rubocop/cop/chef/deprecation/partial_search_class_usage.rb +2 -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 +2 -1
- data/lib/rubocop/cop/chef/deprecation/require_recipe.rb +1 -1
- data/lib/rubocop/cop/chef/deprecation/resource_overrides_provides_method.rb +3 -3
- 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 +2 -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 +2 -1
- data/lib/rubocop/cop/chef/modernize/conditional_using_test.rb +2 -2
- 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 +2 -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 +3 -2
- data/lib/rubocop/cop/chef/modernize/node_roles_include.rb +2 -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 +2 -2
- data/lib/rubocop/cop/chef/modernize/respond_to_provides.rb +10 -10
- data/lib/rubocop/cop/chef/modernize/respond_to_resource_name.rb +2 -2
- 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 +2 -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 +1 -1
- 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 +2 -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 +2 -1
- data/lib/rubocop/cop/chef/redundant/ohai_attribute_to_string.rb +2 -1
- data/lib/rubocop/cop/chef/redundant/property_splat_regex.rb +2 -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 +2 -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 +2 -1
- data/lib/rubocop/cop/chef/style/true_false_resource_properties.rb +1 -1
- data/lib/rubocop/cop/chef/style/unnecessary_os_check.rb +2 -1
- data/lib/rubocop/cop/chef/style/unnecessary_platform_case_statement.rb +1 -1
- data/lib/rubocop/cop/chef/style/use_platform_helpers.rb +2 -1
- data/lib/rubocop/monkey_patches/comment_config.rb +1 -1
- metadata +7 -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:
|
@@ -327,6 +333,8 @@ Lint/RedundantCopEnableDirective:
|
|
327
333
|
Enabled: false
|
328
334
|
Lint/RedundantRequireStatement:
|
329
335
|
Enabled: false
|
336
|
+
Lint/RedundantSafeNavigation:
|
337
|
+
Enabled: false
|
330
338
|
Lint/RedundantSplatExpansion:
|
331
339
|
Enabled: false
|
332
340
|
Lint/RedundantStringCoercion:
|
@@ -369,6 +377,8 @@ Lint/SuppressedException:
|
|
369
377
|
Enabled: false
|
370
378
|
Lint/Syntax:
|
371
379
|
Enabled: false
|
380
|
+
Lint/ToEnumArguments:
|
381
|
+
Enabled: false
|
372
382
|
Lint/ToJSON:
|
373
383
|
Enabled: false
|
374
384
|
Lint/TopLevelReturnWithArgument:
|
@@ -379,6 +389,8 @@ Lint/UnderscorePrefixedVariableName:
|
|
379
389
|
Enabled: false
|
380
390
|
Lint/UnifiedInteger:
|
381
391
|
Enabled: false
|
392
|
+
Lint/UnmodifiedReduceAccumulator:
|
393
|
+
Enabled: false
|
382
394
|
Lint/UnreachableCode:
|
383
395
|
Enabled: false
|
384
396
|
Lint/UnreachableLoop:
|
@@ -463,6 +475,8 @@ Style/Alias:
|
|
463
475
|
Enabled: false
|
464
476
|
Style/AndOr:
|
465
477
|
Enabled: false
|
478
|
+
Style/ArgumentsForwarding:
|
479
|
+
Enabled: false
|
466
480
|
Style/ArrayCoercion:
|
467
481
|
Enabled: false
|
468
482
|
Style/ArrayJoin:
|
@@ -493,6 +507,8 @@ Style/ClassAndModuleChildren:
|
|
493
507
|
Enabled: false
|
494
508
|
Style/ClassCheck:
|
495
509
|
Enabled: false
|
510
|
+
Style/ClassEqualityComparison:
|
511
|
+
Enabled: false
|
496
512
|
Style/ClassMethods:
|
497
513
|
Enabled: false
|
498
514
|
Style/ClassMethodsDefinitions:
|
@@ -531,6 +547,8 @@ Style/DocumentationMethod:
|
|
531
547
|
Enabled: false
|
532
548
|
Style/Documentation:
|
533
549
|
Enabled: false
|
550
|
+
Style/DocumentDynamicEvalDefinition:
|
551
|
+
Enabled: false
|
534
552
|
Style/DoubleCopDisableDirective:
|
535
553
|
Enabled: false
|
536
554
|
Style/DoubleNegation:
|
@@ -801,6 +819,8 @@ Style/Strip:
|
|
801
819
|
Enabled: false
|
802
820
|
Style/StructInheritance:
|
803
821
|
Enabled: false
|
822
|
+
Style/SwapValues:
|
823
|
+
Enabled: false
|
804
824
|
Style/SymbolArray:
|
805
825
|
Enabled: false
|
806
826
|
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:
|
@@ -1474,9 +1479,15 @@ Lint/ElseLayout:
|
|
1474
1479
|
Enabled: true
|
1475
1480
|
VersionAdded: '0.17'
|
1476
1481
|
|
1482
|
+
Lint/EmptyBlock:
|
1483
|
+
Description: 'This cop checks for blocks without a body.'
|
1484
|
+
Enabled: pending
|
1485
|
+
VersionAdded: '1.1'
|
1486
|
+
AllowComments: true
|
1487
|
+
|
1477
1488
|
Lint/EmptyConditionalBody:
|
1478
1489
|
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
1479
|
-
Enabled:
|
1490
|
+
Enabled: true
|
1480
1491
|
AllowComments: true
|
1481
1492
|
VersionAdded: '0.89'
|
1482
1493
|
|
@@ -1493,7 +1504,7 @@ Lint/EmptyExpression:
|
|
1493
1504
|
|
1494
1505
|
Lint/EmptyFile:
|
1495
1506
|
Description: 'Enforces that Ruby source files are not empty.'
|
1496
|
-
Enabled:
|
1507
|
+
Enabled: true
|
1497
1508
|
AllowComments: true
|
1498
1509
|
VersionAdded: '0.90'
|
1499
1510
|
|
@@ -1531,7 +1542,7 @@ Lint/FlipFlop:
|
|
1531
1542
|
Lint/FloatComparison:
|
1532
1543
|
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
1533
1544
|
StyleGuide: '#float-comparison'
|
1534
|
-
Enabled:
|
1545
|
+
Enabled: true
|
1535
1546
|
VersionAdded: '0.89'
|
1536
1547
|
|
1537
1548
|
Lint/FloatOutOfRange:
|
@@ -1546,6 +1557,13 @@ Lint/FormatParameterMismatch:
|
|
1546
1557
|
Enabled: true
|
1547
1558
|
VersionAdded: '0.33'
|
1548
1559
|
|
1560
|
+
Lint/HashCompareByIdentity:
|
1561
|
+
Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.'
|
1562
|
+
StyleGuide: '#identity-comparison'
|
1563
|
+
Enabled: true
|
1564
|
+
Safe: false
|
1565
|
+
VersionAdded: '0.93'
|
1566
|
+
|
1549
1567
|
Lint/HeredocMethodCallPosition:
|
1550
1568
|
Description: >-
|
1551
1569
|
Checks for the ordering of a method call where
|
@@ -1556,7 +1574,7 @@ Lint/HeredocMethodCallPosition:
|
|
1556
1574
|
|
1557
1575
|
Lint/IdentityComparison:
|
1558
1576
|
Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
|
1559
|
-
Enabled:
|
1577
|
+
Enabled: true
|
1560
1578
|
StyleGuide: '#identity-comparison'
|
1561
1579
|
VersionAdded: '0.91'
|
1562
1580
|
|
@@ -1628,19 +1646,20 @@ Lint/MissingSuper:
|
|
1628
1646
|
Description: >-
|
1629
1647
|
This cop checks for the presence of constructors and lifecycle callbacks
|
1630
1648
|
without calls to `super`'.
|
1631
|
-
Enabled:
|
1649
|
+
Enabled: true
|
1632
1650
|
VersionAdded: '0.89'
|
1633
1651
|
|
1634
1652
|
Lint/MixedRegexpCaptureTypes:
|
1635
1653
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
1636
|
-
Enabled:
|
1654
|
+
Enabled: true
|
1637
1655
|
VersionAdded: '0.85'
|
1638
1656
|
|
1639
1657
|
Lint/MultipleComparison:
|
1640
1658
|
Description: "Use `&&` operator to compare multiple values."
|
1641
1659
|
Enabled: true
|
1642
1660
|
VersionAdded: '0.47'
|
1643
|
-
VersionChanged: '
|
1661
|
+
VersionChanged: '1.1'
|
1662
|
+
AllowMethodComparison: true
|
1644
1663
|
|
1645
1664
|
Lint/NestedMethodDefinition:
|
1646
1665
|
Description: 'Do not use nested method definitions.'
|
@@ -1675,8 +1694,12 @@ Lint/NumberConversion:
|
|
1675
1694
|
Description: 'Checks unsafe usage of number conversion methods.'
|
1676
1695
|
Enabled: false
|
1677
1696
|
VersionAdded: '0.53'
|
1678
|
-
VersionChanged: '
|
1697
|
+
VersionChanged: '1.1'
|
1679
1698
|
SafeAutoCorrect: false
|
1699
|
+
IgnoredMethods: []
|
1700
|
+
IgnoredClasses:
|
1701
|
+
- Time
|
1702
|
+
- DateTime
|
1680
1703
|
|
1681
1704
|
Lint/OrderedMagicComments:
|
1682
1705
|
Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
|
@@ -1685,7 +1708,7 @@ Lint/OrderedMagicComments:
|
|
1685
1708
|
|
1686
1709
|
Lint/OutOfRangeRegexpRef:
|
1687
1710
|
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
1688
|
-
Enabled:
|
1711
|
+
Enabled: true
|
1689
1712
|
Safe: false
|
1690
1713
|
VersionAdded: '0.89'
|
1691
1714
|
|
@@ -1714,7 +1737,7 @@ Lint/PercentSymbolArray:
|
|
1714
1737
|
Lint/RaiseException:
|
1715
1738
|
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
1716
1739
|
StyleGuide: '#raise-exception'
|
1717
|
-
Enabled:
|
1740
|
+
Enabled: true
|
1718
1741
|
Safe: false
|
1719
1742
|
VersionAdded: '0.81'
|
1720
1743
|
VersionChanged: '0.86'
|
@@ -1746,6 +1769,19 @@ Lint/RedundantRequireStatement:
|
|
1746
1769
|
Enabled: true
|
1747
1770
|
VersionAdded: '0.76'
|
1748
1771
|
|
1772
|
+
Lint/RedundantSafeNavigation:
|
1773
|
+
Description: 'Checks for redundant safe navigation calls.'
|
1774
|
+
Enabled: true
|
1775
|
+
VersionAdded: '0.93'
|
1776
|
+
AllowedMethods:
|
1777
|
+
- instance_of?
|
1778
|
+
- kind_of?
|
1779
|
+
- is_a?
|
1780
|
+
- eql?
|
1781
|
+
- respond_to?
|
1782
|
+
- equal?
|
1783
|
+
Safe: false
|
1784
|
+
|
1749
1785
|
Lint/RedundantSplatExpansion:
|
1750
1786
|
Description: 'Checks for splat unnecessarily being called on literals.'
|
1751
1787
|
Enabled: true
|
@@ -1842,7 +1878,7 @@ Lint/ScriptPermission:
|
|
1842
1878
|
|
1843
1879
|
Lint/SelfAssignment:
|
1844
1880
|
Description: 'Checks for self-assignments.'
|
1845
|
-
Enabled:
|
1881
|
+
Enabled: true
|
1846
1882
|
VersionAdded: '0.89'
|
1847
1883
|
|
1848
1884
|
Lint/SendWithMixinArgument:
|
@@ -1873,7 +1909,7 @@ Lint/ShadowingOuterLocalVariable:
|
|
1873
1909
|
|
1874
1910
|
Lint/StructNewOverride:
|
1875
1911
|
Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
|
1876
|
-
Enabled:
|
1912
|
+
Enabled: true
|
1877
1913
|
VersionAdded: '0.81'
|
1878
1914
|
|
1879
1915
|
Lint/SuppressedException:
|
@@ -1890,6 +1926,11 @@ Lint/Syntax:
|
|
1890
1926
|
VersionAdded: '0.9'
|
1891
1927
|
|
1892
1928
|
|
1929
|
+
Lint/ToEnumArguments:
|
1930
|
+
Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
|
1931
|
+
Enabled: pending
|
1932
|
+
VersionAdded: '1.1'
|
1933
|
+
|
1893
1934
|
Lint/ToJSON:
|
1894
1935
|
Description: 'Ensure #to_json includes an optional argument.'
|
1895
1936
|
Enabled: true
|
@@ -1897,12 +1938,12 @@ Lint/ToJSON:
|
|
1897
1938
|
|
1898
1939
|
Lint/TopLevelReturnWithArgument:
|
1899
1940
|
Description: 'This cop detects top level return statements with argument.'
|
1900
|
-
Enabled:
|
1941
|
+
Enabled: true
|
1901
1942
|
VersionAdded: '0.89'
|
1902
1943
|
|
1903
1944
|
Lint/TrailingCommaInAttributeDeclaration:
|
1904
1945
|
Description: 'This cop checks for trailing commas in attribute declarations.'
|
1905
|
-
Enabled:
|
1946
|
+
Enabled: true
|
1906
1947
|
VersionAdded: '0.90'
|
1907
1948
|
|
1908
1949
|
Lint/UnderscorePrefixedVariableName:
|
@@ -1916,6 +1957,11 @@ Lint/UnifiedInteger:
|
|
1916
1957
|
Enabled: true
|
1917
1958
|
VersionAdded: '0.43'
|
1918
1959
|
|
1960
|
+
Lint/UnmodifiedReduceAccumulator:
|
1961
|
+
Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
|
1962
|
+
Enabled: pending
|
1963
|
+
VersionAdded: '1.1'
|
1964
|
+
|
1919
1965
|
Lint/UnreachableCode:
|
1920
1966
|
Description: 'Unreachable code.'
|
1921
1967
|
Enabled: true
|
@@ -1923,7 +1969,7 @@ Lint/UnreachableCode:
|
|
1923
1969
|
|
1924
1970
|
Lint/UnreachableLoop:
|
1925
1971
|
Description: 'This cop checks for loops that will have at most one iteration.'
|
1926
|
-
Enabled:
|
1972
|
+
Enabled: true
|
1927
1973
|
VersionAdded: '0.89'
|
1928
1974
|
|
1929
1975
|
Lint/UnusedBlockArgument:
|
@@ -1982,7 +2028,7 @@ Lint/UselessElseWithoutRescue:
|
|
1982
2028
|
|
1983
2029
|
Lint/UselessMethodDefinition:
|
1984
2030
|
Description: 'Checks for useless method definitions.'
|
1985
|
-
Enabled:
|
2031
|
+
Enabled: true
|
1986
2032
|
VersionAdded: '0.90'
|
1987
2033
|
Safe: false
|
1988
2034
|
AllowComments: true
|
@@ -1996,7 +2042,7 @@ Lint/UselessSetterCall:
|
|
1996
2042
|
|
1997
2043
|
Lint/UselessTimes:
|
1998
2044
|
Description: 'Checks for useless `Integer#times` calls.'
|
1999
|
-
Enabled:
|
2045
|
+
Enabled: true
|
2000
2046
|
VersionAdded: '0.91'
|
2001
2047
|
Safe: false
|
2002
2048
|
|
@@ -2395,9 +2441,10 @@ Security/MarshalLoad:
|
|
2395
2441
|
VersionAdded: '0.47'
|
2396
2442
|
|
2397
2443
|
Security/Open:
|
2398
|
-
Description: 'The use of Kernel#open
|
2444
|
+
Description: 'The use of `Kernel#open` and `URI.open` represent a serious security risk.'
|
2399
2445
|
Enabled: true
|
2400
2446
|
VersionAdded: '0.53'
|
2447
|
+
VersionChanged: '1.0'
|
2401
2448
|
Safe: false
|
2402
2449
|
|
2403
2450
|
Security/YAMLLoad:
|
@@ -2424,7 +2471,7 @@ Style/AccessModifierDeclarations:
|
|
2424
2471
|
|
2425
2472
|
Style/AccessorGrouping:
|
2426
2473
|
Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
|
2427
|
-
Enabled:
|
2474
|
+
Enabled: true
|
2428
2475
|
VersionAdded: '0.87'
|
2429
2476
|
EnforcedStyle: grouped
|
2430
2477
|
SupportedStyles:
|
@@ -2457,6 +2504,13 @@ Style/AndOr:
|
|
2457
2504
|
- always
|
2458
2505
|
- conditionals
|
2459
2506
|
|
2507
|
+
Style/ArgumentsForwarding:
|
2508
|
+
Description: 'Use arguments forwarding.'
|
2509
|
+
StyleGuide: '#arguments-forwarding'
|
2510
|
+
Enabled: pending
|
2511
|
+
AllowOnlyRestArgument: true
|
2512
|
+
VersionAdded: '1.1'
|
2513
|
+
|
2460
2514
|
Style/ArrayCoercion:
|
2461
2515
|
Description: >-
|
2462
2516
|
Use Array() instead of explicit Array check or [*var], when dealing
|
@@ -2513,7 +2567,7 @@ Style/BisectedAttrAccessor:
|
|
2513
2567
|
Description: >-
|
2514
2568
|
Checks for places where `attr_reader` and `attr_writer`
|
2515
2569
|
for the same method can be combined into single `attr_accessor`.
|
2516
|
-
Enabled:
|
2570
|
+
Enabled: true
|
2517
2571
|
VersionAdded: '0.87'
|
2518
2572
|
|
2519
2573
|
Style/BlockComments:
|
@@ -2652,7 +2706,7 @@ Style/CaseEquality:
|
|
2652
2706
|
Style/CaseLikeIf:
|
2653
2707
|
Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
|
2654
2708
|
StyleGuide: '#case-vs-if-else'
|
2655
|
-
Enabled:
|
2709
|
+
Enabled: true
|
2656
2710
|
Safe: false
|
2657
2711
|
VersionAdded: '0.88'
|
2658
2712
|
|
@@ -2702,6 +2756,16 @@ Style/ClassCheck:
|
|
2702
2756
|
- is_a?
|
2703
2757
|
- kind_of?
|
2704
2758
|
|
2759
|
+
Style/ClassEqualityComparison:
|
2760
|
+
Description: 'Enforces the use of `Object#instance_of?` instead of class comparison for equality.'
|
2761
|
+
StyleGuide: '#instance-of-vs-class-comparison'
|
2762
|
+
Enabled: true
|
2763
|
+
VersionAdded: '0.93'
|
2764
|
+
IgnoredMethods:
|
2765
|
+
- ==
|
2766
|
+
- equal?
|
2767
|
+
- eql?
|
2768
|
+
|
2705
2769
|
Style/ClassMethods:
|
2706
2770
|
Description: 'Use self when defining module/class methods.'
|
2707
2771
|
StyleGuide: '#def-self-class-methods'
|
@@ -2763,7 +2827,7 @@ Style/CombinableLoops:
|
|
2763
2827
|
Description: >-
|
2764
2828
|
Checks for places where multiple consecutive loops over the same data
|
2765
2829
|
can be combined into a single loop.
|
2766
|
-
Enabled:
|
2830
|
+
Enabled: true
|
2767
2831
|
Safe: false
|
2768
2832
|
VersionAdded: '0.90'
|
2769
2833
|
|
@@ -2887,6 +2951,14 @@ Style/DisableCopsWithinSourceCodeDirective:
|
|
2887
2951
|
Enabled: false
|
2888
2952
|
VersionAdded: '0.82'
|
2889
2953
|
|
2954
|
+
Style/DocumentDynamicEvalDefinition:
|
2955
|
+
Description: >-
|
2956
|
+
When using `class_eval` (or other `eval`) with string interpolation,
|
2957
|
+
add a comment block showing its appearance if interpolated.
|
2958
|
+
StyleGuide: '#eval-comment-docs'
|
2959
|
+
Enabled: pending
|
2960
|
+
VersionAdded: '1.1'
|
2961
|
+
|
2890
2962
|
Style/Documentation:
|
2891
2963
|
Description: 'Document classes and non-namespace modules.'
|
2892
2964
|
Enabled: true
|
@@ -3016,7 +3088,7 @@ Style/ExplicitBlockArgument:
|
|
3016
3088
|
Consider using explicit block argument to avoid writing block literal
|
3017
3089
|
that just passes its arguments to another block.
|
3018
3090
|
StyleGuide: '#block-argument'
|
3019
|
-
Enabled:
|
3091
|
+
Enabled: true
|
3020
3092
|
# May change the yielding arity.
|
3021
3093
|
Safe: false
|
3022
3094
|
VersionAdded: '0.89'
|
@@ -3024,7 +3096,7 @@ Style/ExplicitBlockArgument:
|
|
3024
3096
|
Style/ExponentialNotation:
|
3025
3097
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
3026
3098
|
StyleGuide: '#exponential-notation'
|
3027
|
-
Enabled:
|
3099
|
+
Enabled: true
|
3028
3100
|
VersionAdded: '0.82'
|
3029
3101
|
EnforcedStyle: scientific
|
3030
3102
|
SupportedStyles:
|
@@ -3079,8 +3151,12 @@ Style/FormatStringToken:
|
|
3079
3151
|
# Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
|
3080
3152
|
- template
|
3081
3153
|
- unannotated
|
3154
|
+
# `MaxUnannotatedPlaceholdersAllowed` defines the number of `unannotated`
|
3155
|
+
# style token in a format string to be allowed when enforced style is not
|
3156
|
+
# `unannotated`.
|
3157
|
+
MaxUnannotatedPlaceholdersAllowed: 1
|
3082
3158
|
VersionAdded: '0.49'
|
3083
|
-
VersionChanged: '0
|
3159
|
+
VersionChanged: '1.0'
|
3084
3160
|
|
3085
3161
|
Style/FrozenStringLiteralComment:
|
3086
3162
|
Description: >-
|
@@ -3107,7 +3183,7 @@ Style/FrozenStringLiteralComment:
|
|
3107
3183
|
Style/GlobalStdStream:
|
3108
3184
|
Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
|
3109
3185
|
StyleGuide: '#global-stdout'
|
3110
|
-
Enabled:
|
3186
|
+
Enabled: true
|
3111
3187
|
VersionAdded: '0.89'
|
3112
3188
|
SafeAutoCorrect: false
|
3113
3189
|
|
@@ -3135,7 +3211,7 @@ Style/HashAsLastArrayItem:
|
|
3135
3211
|
Checks for presence or absence of braces around hash literal as a last
|
3136
3212
|
array item depending on configuration.
|
3137
3213
|
StyleGuide: '#hash-literal-as-last-array-item'
|
3138
|
-
Enabled:
|
3214
|
+
Enabled: true
|
3139
3215
|
VersionAdded: '0.88'
|
3140
3216
|
EnforcedStyle: braces
|
3141
3217
|
SupportedStyles:
|
@@ -3145,7 +3221,7 @@ Style/HashAsLastArrayItem:
|
|
3145
3221
|
Style/HashEachMethods:
|
3146
3222
|
Description: 'Use Hash#each_key and Hash#each_value.'
|
3147
3223
|
StyleGuide: '#hash-each'
|
3148
|
-
Enabled:
|
3224
|
+
Enabled: true
|
3149
3225
|
VersionAdded: '0.80'
|
3150
3226
|
Safe: false
|
3151
3227
|
|
@@ -3153,7 +3229,7 @@ Style/HashLikeCase:
|
|
3153
3229
|
Description: >-
|
3154
3230
|
Checks for places where `case-when` represents a simple 1:1
|
3155
3231
|
mapping and can be replaced with a hash lookup.
|
3156
|
-
Enabled:
|
3232
|
+
Enabled: true
|
3157
3233
|
VersionAdded: '0.88'
|
3158
3234
|
# `MinBranchesCount` defines the number of branches `case` needs to have
|
3159
3235
|
# to trigger this cop
|
@@ -3184,14 +3260,14 @@ Style/HashSyntax:
|
|
3184
3260
|
|
3185
3261
|
Style/HashTransformKeys:
|
3186
3262
|
Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.'
|
3187
|
-
Enabled:
|
3263
|
+
Enabled: true
|
3188
3264
|
VersionAdded: '0.80'
|
3189
3265
|
VersionChanged: '0.90'
|
3190
3266
|
Safe: false
|
3191
3267
|
|
3192
3268
|
Style/HashTransformValues:
|
3193
3269
|
Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.'
|
3194
|
-
Enabled:
|
3270
|
+
Enabled: true
|
3195
3271
|
VersionAdded: '0.80'
|
3196
3272
|
VersionChanged: '0.90'
|
3197
3273
|
Safe: false
|
@@ -3298,7 +3374,7 @@ Style/IpAddresses:
|
|
3298
3374
|
Style/KeywordParametersOrder:
|
3299
3375
|
Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.'
|
3300
3376
|
StyleGuide: '#keyword-parameters-order'
|
3301
|
-
Enabled:
|
3377
|
+
Enabled: true
|
3302
3378
|
VersionAdded: '0.90'
|
3303
3379
|
|
3304
3380
|
Style/Lambda:
|
@@ -3500,6 +3576,7 @@ Style/MultipleComparison:
|
|
3500
3576
|
use Array#include? instead.
|
3501
3577
|
Enabled: true
|
3502
3578
|
VersionAdded: '0.49'
|
3579
|
+
VersionChanged: '1.1'
|
3503
3580
|
|
3504
3581
|
Style/MutableConstant:
|
3505
3582
|
Description: 'Do not assign mutable objects to constants.'
|
@@ -3723,7 +3800,7 @@ Style/OptionalArguments:
|
|
3723
3800
|
Style/OptionalBooleanParameter:
|
3724
3801
|
Description: 'Use keyword arguments when defining method with boolean argument.'
|
3725
3802
|
StyleGuide: '#boolean-keyword-arguments'
|
3726
|
-
Enabled:
|
3803
|
+
Enabled: true
|
3727
3804
|
Safe: false
|
3728
3805
|
VersionAdded: '0.89'
|
3729
3806
|
AllowedMethods:
|
@@ -3827,7 +3904,7 @@ Style/RandomWithOffset:
|
|
3827
3904
|
|
3828
3905
|
Style/RedundantAssignment:
|
3829
3906
|
Description: 'Checks for redundant assignment before returning.'
|
3830
|
-
Enabled:
|
3907
|
+
Enabled: true
|
3831
3908
|
VersionAdded: '0.87'
|
3832
3909
|
|
3833
3910
|
Style/RedundantBegin:
|
@@ -3864,7 +3941,7 @@ Style/RedundantFetchBlock:
|
|
3864
3941
|
Use `fetch(key, value)` instead of `fetch(key) { value }`
|
3865
3942
|
when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
|
3866
3943
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
|
3867
|
-
Enabled:
|
3944
|
+
Enabled: true
|
3868
3945
|
Safe: false
|
3869
3946
|
# If enabled, this cop will autocorrect usages of
|
3870
3947
|
# `fetch` being called with block returning a constant.
|
@@ -3877,7 +3954,7 @@ Style/RedundantFileExtensionInRequire:
|
|
3877
3954
|
Checks for the presence of superfluous `.rb` extension in
|
3878
3955
|
the filename provided to `require` and `require_relative`.
|
3879
3956
|
StyleGuide: '#no-explicit-rb-to-require'
|
3880
|
-
Enabled:
|
3957
|
+
Enabled: true
|
3881
3958
|
VersionAdded: '0.88'
|
3882
3959
|
|
3883
3960
|
Style/RedundantFreeze:
|
@@ -3904,12 +3981,12 @@ Style/RedundantPercentQ:
|
|
3904
3981
|
|
3905
3982
|
Style/RedundantRegexpCharacterClass:
|
3906
3983
|
Description: 'Checks for unnecessary single-element Regexp character classes.'
|
3907
|
-
Enabled:
|
3984
|
+
Enabled: true
|
3908
3985
|
VersionAdded: '0.85'
|
3909
3986
|
|
3910
3987
|
Style/RedundantRegexpEscape:
|
3911
3988
|
Description: 'Checks for redundant escapes in Regexps.'
|
3912
|
-
Enabled:
|
3989
|
+
Enabled: true
|
3913
3990
|
VersionAdded: '0.85'
|
3914
3991
|
|
3915
3992
|
Style/RedundantReturn:
|
@@ -3930,7 +4007,7 @@ Style/RedundantSelf:
|
|
3930
4007
|
|
3931
4008
|
Style/RedundantSelfAssignment:
|
3932
4009
|
Description: 'Checks for places where redundant assignments are made for in place modification methods.'
|
3933
|
-
Enabled:
|
4010
|
+
Enabled: true
|
3934
4011
|
Safe: false
|
3935
4012
|
VersionAdded: '0.90'
|
3936
4013
|
|
@@ -4058,7 +4135,7 @@ Style/SignalException:
|
|
4058
4135
|
|
4059
4136
|
Style/SingleArgumentDig:
|
4060
4137
|
Description: 'Avoid using single argument dig method.'
|
4061
|
-
Enabled:
|
4138
|
+
Enabled: true
|
4062
4139
|
VersionAdded: '0.89'
|
4063
4140
|
Safe: false
|
4064
4141
|
|
@@ -4085,7 +4162,7 @@ Style/SingleLineMethods:
|
|
4085
4162
|
|
4086
4163
|
Style/SlicingWithRange:
|
4087
4164
|
Description: 'Checks array slicing is done with endless ranges when suitable.'
|
4088
|
-
Enabled:
|
4165
|
+
Enabled: true
|
4089
4166
|
VersionAdded: '0.83'
|
4090
4167
|
Safe: false
|
4091
4168
|
|
@@ -4093,7 +4170,7 @@ Style/SoleNestedConditional:
|
|
4093
4170
|
Description: >-
|
4094
4171
|
Finds sole nested conditional nodes
|
4095
4172
|
which can be merged into outer conditional node.
|
4096
|
-
Enabled:
|
4173
|
+
Enabled: true
|
4097
4174
|
VersionAdded: '0.89'
|
4098
4175
|
AllowModifier: false
|
4099
4176
|
|
@@ -4128,7 +4205,7 @@ Style/StderrPuts:
|
|
4128
4205
|
Style/StringConcatenation:
|
4129
4206
|
Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
|
4130
4207
|
StyleGuide: '#string-interpolation'
|
4131
|
-
Enabled:
|
4208
|
+
Enabled: true
|
4132
4209
|
Safe: false
|
4133
4210
|
VersionAdded: '0.89'
|
4134
4211
|
|
@@ -4191,6 +4268,13 @@ Style/StructInheritance:
|
|
4191
4268
|
VersionAdded: '0.29'
|
4192
4269
|
VersionChanged: '0.86'
|
4193
4270
|
|
4271
|
+
Style/SwapValues:
|
4272
|
+
Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.'
|
4273
|
+
StyleGuide: '#values-swapping'
|
4274
|
+
Enabled: pending
|
4275
|
+
VersionAdded: '1.1'
|
4276
|
+
SafeAutoCorrect: false
|
4277
|
+
|
4194
4278
|
Style/SymbolArray:
|
4195
4279
|
Description: 'Use %i or %I for arrays of symbols.'
|
4196
4280
|
StyleGuide: '#percent-i'
|