cookstyle 6.20.1 → 7.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/config/cookstyle.yml +277 -241
- data/config/disable_all.yml +28 -0
- data/config/upstream.yml +214 -81
- 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 +8 -4
data/config/disable_all.yml
CHANGED
@@ -229,6 +229,8 @@ Lint/DeprecatedOpenSSLConstant:
|
|
229
229
|
Enabled: false
|
230
230
|
Lint/DisjunctiveAssignmentInConstructor:
|
231
231
|
Enabled: false
|
232
|
+
Lint/DuplicateBranch:
|
233
|
+
Enabled: false
|
232
234
|
Lint/DuplicateCaseCondition:
|
233
235
|
Enabled: false
|
234
236
|
Lint/DuplicateElsifCondition:
|
@@ -237,6 +239,8 @@ Lint/DuplicateHashKey:
|
|
237
239
|
Enabled: false
|
238
240
|
Lint/DuplicateMethods:
|
239
241
|
Enabled: false
|
242
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
243
|
+
Enabled: false
|
240
244
|
Lint/DuplicateRequire:
|
241
245
|
Enabled: false
|
242
246
|
Lint/DuplicateRescueException:
|
@@ -245,6 +249,10 @@ Lint/EachWithObjectArgument:
|
|
245
249
|
Enabled: false
|
246
250
|
Lint/ElseLayout:
|
247
251
|
Enabled: false
|
252
|
+
Lint/EmptyBlock:
|
253
|
+
Enabled: false
|
254
|
+
Lint/EmptyClass:
|
255
|
+
Enabled: false
|
248
256
|
Lint/EmptyConditionalBody:
|
249
257
|
Enabled: false
|
250
258
|
Lint/EmptyEnsure:
|
@@ -303,6 +311,8 @@ Lint/NestedPercentLiteral:
|
|
303
311
|
Enabled: false
|
304
312
|
Lint/NextWithoutAccumulator:
|
305
313
|
Enabled: false
|
314
|
+
Lint/NoReturnInBeginEndBlocks:
|
315
|
+
Enabled: false
|
306
316
|
Lint/NonDeterministicRequireOrder:
|
307
317
|
Enabled: false
|
308
318
|
Lint/NonLocalExitFromIterator:
|
@@ -373,6 +383,8 @@ Lint/SuppressedException:
|
|
373
383
|
Enabled: false
|
374
384
|
Lint/Syntax:
|
375
385
|
Enabled: false
|
386
|
+
Lint/ToEnumArguments:
|
387
|
+
Enabled: false
|
376
388
|
Lint/ToJSON:
|
377
389
|
Enabled: false
|
378
390
|
Lint/TopLevelReturnWithArgument:
|
@@ -383,6 +395,8 @@ Lint/UnderscorePrefixedVariableName:
|
|
383
395
|
Enabled: false
|
384
396
|
Lint/UnifiedInteger:
|
385
397
|
Enabled: false
|
398
|
+
Lint/UnmodifiedReduceAccumulator:
|
399
|
+
Enabled: false
|
386
400
|
Lint/UnreachableCode:
|
387
401
|
Enabled: false
|
388
402
|
Lint/UnreachableLoop:
|
@@ -467,6 +481,8 @@ Style/Alias:
|
|
467
481
|
Enabled: false
|
468
482
|
Style/AndOr:
|
469
483
|
Enabled: false
|
484
|
+
Style/ArgumentsForwarding:
|
485
|
+
Enabled: false
|
470
486
|
Style/ArrayCoercion:
|
471
487
|
Enabled: false
|
472
488
|
Style/ArrayJoin:
|
@@ -505,6 +521,8 @@ Style/ClassMethodsDefinitions:
|
|
505
521
|
Enabled: false
|
506
522
|
Style/ClassVars:
|
507
523
|
Enabled: false
|
524
|
+
Style/CollectionCompact:
|
525
|
+
Enabled: false
|
508
526
|
Style/CollectionMethods:
|
509
527
|
Enabled: false
|
510
528
|
Style/ColonMethodCall:
|
@@ -537,6 +555,8 @@ Style/DocumentationMethod:
|
|
537
555
|
Enabled: false
|
538
556
|
Style/Documentation:
|
539
557
|
Enabled: false
|
558
|
+
Style/DocumentDynamicEvalDefinition:
|
559
|
+
Enabled: false
|
540
560
|
Style/DoubleCopDisableDirective:
|
541
561
|
Enabled: false
|
542
562
|
Style/DoubleNegation:
|
@@ -641,6 +661,8 @@ Style/RedundantSelfAssignment:
|
|
641
661
|
Enabled: false
|
642
662
|
Style/SoleNestedConditional:
|
643
663
|
Enabled: false
|
664
|
+
Style/StaticClass:
|
665
|
+
Enabled: false
|
644
666
|
Style/MethodCalledOnDoEndBlock:
|
645
667
|
Enabled: false
|
646
668
|
Style/MethodDefParentheses:
|
@@ -677,6 +699,8 @@ Style/MutableConstant:
|
|
677
699
|
Enabled: false
|
678
700
|
Style/NegatedIf:
|
679
701
|
Enabled: false
|
702
|
+
Style/NegatedIfElseCondition:
|
703
|
+
Enabled: false
|
680
704
|
Style/NegatedUnless:
|
681
705
|
Enabled: false
|
682
706
|
Style/NegatedWhile:
|
@@ -691,6 +715,8 @@ Style/Next:
|
|
691
715
|
Enabled: false
|
692
716
|
Style/NilComparison:
|
693
717
|
Enabled: false
|
718
|
+
Style/NilLambda:
|
719
|
+
Enabled: false
|
694
720
|
Style/NonNilCheck:
|
695
721
|
Enabled: false
|
696
722
|
Style/Not:
|
@@ -807,6 +833,8 @@ Style/Strip:
|
|
807
833
|
Enabled: false
|
808
834
|
Style/StructInheritance:
|
809
835
|
Enabled: false
|
836
|
+
Style/SwapValues:
|
837
|
+
Enabled: false
|
810
838
|
Style/SymbolArray:
|
811
839
|
Enabled: false
|
812
840
|
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
|
@@ -891,7 +891,7 @@ Layout/LineLength:
|
|
891
891
|
StyleGuide: '#max-line-length'
|
892
892
|
Enabled: true
|
893
893
|
VersionAdded: '0.25'
|
894
|
-
VersionChanged: '
|
894
|
+
VersionChanged: '1.3'
|
895
895
|
AutoCorrect: false
|
896
896
|
Max: 120
|
897
897
|
# To make it possible to copy or click on URIs in the code, we allow lines
|
@@ -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:
|
@@ -1176,7 +1176,7 @@ Layout/SpaceBeforeBlockBraces:
|
|
1176
1176
|
SupportedStylesForEmptyBraces:
|
1177
1177
|
- space
|
1178
1178
|
- no_space
|
1179
|
-
VersionChanged: '0.52
|
1179
|
+
VersionChanged: '0.52'
|
1180
1180
|
|
1181
1181
|
Layout/SpaceBeforeComma:
|
1182
1182
|
Description: 'No spaces before commas.'
|
@@ -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,8 +1398,13 @@ 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
|
+
VersionChanged: '1.3'
|
1404
|
+
# `enums` for Typed Enums via T::Enum in Sorbet.
|
1405
|
+
# https://sorbet.org/docs/tenum
|
1406
|
+
AllowedMethods:
|
1407
|
+
- enums
|
1403
1408
|
|
1404
1409
|
Lint/ConstantResolution:
|
1405
1410
|
Description: 'Check that constants are fully qualified with `::`.'
|
@@ -1415,6 +1420,22 @@ Lint/Debugger:
|
|
1415
1420
|
Enabled: true
|
1416
1421
|
VersionAdded: '0.14'
|
1417
1422
|
VersionChanged: '0.49'
|
1423
|
+
DebuggerReceivers:
|
1424
|
+
- binding
|
1425
|
+
- Kernel
|
1426
|
+
- Pry
|
1427
|
+
DebuggerMethods:
|
1428
|
+
- debugger
|
1429
|
+
- byebug
|
1430
|
+
- remote_byebug
|
1431
|
+
- pry
|
1432
|
+
- remote_pry
|
1433
|
+
- pry_remote
|
1434
|
+
- console
|
1435
|
+
- rescue
|
1436
|
+
- save_and_open_page
|
1437
|
+
- save_and_open_screenshot
|
1438
|
+
- irb
|
1418
1439
|
|
1419
1440
|
Lint/DeprecatedClassMethods:
|
1420
1441
|
Description: 'Check for deprecated class method calls.'
|
@@ -1423,7 +1444,7 @@ Lint/DeprecatedClassMethods:
|
|
1423
1444
|
|
1424
1445
|
Lint/DeprecatedOpenSSLConstant:
|
1425
1446
|
Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
|
1426
|
-
Enabled:
|
1447
|
+
Enabled: true
|
1427
1448
|
VersionAdded: '0.84'
|
1428
1449
|
|
1429
1450
|
Lint/DisjunctiveAssignmentInConstructor:
|
@@ -1433,6 +1454,11 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
1433
1454
|
VersionAdded: '0.62'
|
1434
1455
|
VersionChanged: '0.88'
|
1435
1456
|
|
1457
|
+
Lint/DuplicateBranch:
|
1458
|
+
Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs.
|
1459
|
+
Enabled: pending
|
1460
|
+
VersionAdded: '1.3'
|
1461
|
+
|
1436
1462
|
Lint/DuplicateCaseCondition:
|
1437
1463
|
Description: 'Do not repeat values in case conditionals.'
|
1438
1464
|
Enabled: true
|
@@ -1440,7 +1466,7 @@ Lint/DuplicateCaseCondition:
|
|
1440
1466
|
|
1441
1467
|
Lint/DuplicateElsifCondition:
|
1442
1468
|
Description: 'Do not repeat conditions used in if `elsif`.'
|
1443
|
-
Enabled:
|
1469
|
+
Enabled: true
|
1444
1470
|
VersionAdded: '0.88'
|
1445
1471
|
|
1446
1472
|
Lint/DuplicateHashKey:
|
@@ -1454,14 +1480,19 @@ Lint/DuplicateMethods:
|
|
1454
1480
|
Enabled: true
|
1455
1481
|
VersionAdded: '0.29'
|
1456
1482
|
|
1483
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
1484
|
+
Description: 'Checks for duplicate elements in Regexp character classes.'
|
1485
|
+
Enabled: pending
|
1486
|
+
VersionAdded: '1.1'
|
1487
|
+
|
1457
1488
|
Lint/DuplicateRequire:
|
1458
1489
|
Description: 'Check for duplicate `require`s and `require_relative`s.'
|
1459
|
-
Enabled:
|
1490
|
+
Enabled: true
|
1460
1491
|
VersionAdded: '0.90'
|
1461
1492
|
|
1462
1493
|
Lint/DuplicateRescueException:
|
1463
1494
|
Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
|
1464
|
-
Enabled:
|
1495
|
+
Enabled: true
|
1465
1496
|
VersionAdded: '0.89'
|
1466
1497
|
|
1467
1498
|
Lint/EachWithObjectArgument:
|
@@ -1473,10 +1504,25 @@ Lint/ElseLayout:
|
|
1473
1504
|
Description: 'Check for odd code arrangement in an else block.'
|
1474
1505
|
Enabled: true
|
1475
1506
|
VersionAdded: '0.17'
|
1507
|
+
VersionChanged: '1.2'
|
1508
|
+
|
1509
|
+
Lint/EmptyBlock:
|
1510
|
+
Description: 'This cop checks for blocks without a body.'
|
1511
|
+
Enabled: pending
|
1512
|
+
VersionAdded: '1.1'
|
1513
|
+
VersionChanged: '1.3'
|
1514
|
+
AllowComments: true
|
1515
|
+
AllowEmptyLambdas: true
|
1516
|
+
|
1517
|
+
Lint/EmptyClass:
|
1518
|
+
Description: 'Checks for classes and metaclasses without a body.'
|
1519
|
+
Enabled: pending
|
1520
|
+
VersionAdded: '1.3'
|
1521
|
+
AllowComments: false
|
1476
1522
|
|
1477
1523
|
Lint/EmptyConditionalBody:
|
1478
1524
|
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
1479
|
-
Enabled:
|
1525
|
+
Enabled: true
|
1480
1526
|
AllowComments: true
|
1481
1527
|
VersionAdded: '0.89'
|
1482
1528
|
|
@@ -1493,7 +1539,7 @@ Lint/EmptyExpression:
|
|
1493
1539
|
|
1494
1540
|
Lint/EmptyFile:
|
1495
1541
|
Description: 'Enforces that Ruby source files are not empty.'
|
1496
|
-
Enabled:
|
1542
|
+
Enabled: true
|
1497
1543
|
AllowComments: true
|
1498
1544
|
VersionAdded: '0.90'
|
1499
1545
|
|
@@ -1531,7 +1577,7 @@ Lint/FlipFlop:
|
|
1531
1577
|
Lint/FloatComparison:
|
1532
1578
|
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
1533
1579
|
StyleGuide: '#float-comparison'
|
1534
|
-
Enabled:
|
1580
|
+
Enabled: true
|
1535
1581
|
VersionAdded: '0.89'
|
1536
1582
|
|
1537
1583
|
Lint/FloatOutOfRange:
|
@@ -1549,7 +1595,7 @@ Lint/FormatParameterMismatch:
|
|
1549
1595
|
Lint/HashCompareByIdentity:
|
1550
1596
|
Description: 'Prefer using `Hash#compare_by_identity` than using `object_id` for keys.'
|
1551
1597
|
StyleGuide: '#identity-comparison'
|
1552
|
-
Enabled:
|
1598
|
+
Enabled: true
|
1553
1599
|
Safe: false
|
1554
1600
|
VersionAdded: '0.93'
|
1555
1601
|
|
@@ -1563,7 +1609,7 @@ Lint/HeredocMethodCallPosition:
|
|
1563
1609
|
|
1564
1610
|
Lint/IdentityComparison:
|
1565
1611
|
Description: 'Prefer `equal?` over `==` when comparing `object_id`.'
|
1566
|
-
Enabled:
|
1612
|
+
Enabled: true
|
1567
1613
|
StyleGuide: '#identity-comparison'
|
1568
1614
|
VersionAdded: '0.91'
|
1569
1615
|
|
@@ -1616,7 +1662,8 @@ Lint/Loop:
|
|
1616
1662
|
StyleGuide: '#loop-with-break'
|
1617
1663
|
Enabled: true
|
1618
1664
|
VersionAdded: '0.9'
|
1619
|
-
VersionChanged: '
|
1665
|
+
VersionChanged: '1.3'
|
1666
|
+
Safe: false
|
1620
1667
|
|
1621
1668
|
Lint/MissingCopEnableDirective:
|
1622
1669
|
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
@@ -1635,19 +1682,20 @@ Lint/MissingSuper:
|
|
1635
1682
|
Description: >-
|
1636
1683
|
This cop checks for the presence of constructors and lifecycle callbacks
|
1637
1684
|
without calls to `super`'.
|
1638
|
-
Enabled:
|
1685
|
+
Enabled: true
|
1639
1686
|
VersionAdded: '0.89'
|
1640
1687
|
|
1641
1688
|
Lint/MixedRegexpCaptureTypes:
|
1642
1689
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
1643
|
-
Enabled:
|
1690
|
+
Enabled: true
|
1644
1691
|
VersionAdded: '0.85'
|
1645
1692
|
|
1646
1693
|
Lint/MultipleComparison:
|
1647
1694
|
Description: "Use `&&` operator to compare multiple values."
|
1648
1695
|
Enabled: true
|
1649
1696
|
VersionAdded: '0.47'
|
1650
|
-
VersionChanged: '
|
1697
|
+
VersionChanged: '1.1'
|
1698
|
+
AllowMethodComparison: true
|
1651
1699
|
|
1652
1700
|
Lint/NestedMethodDefinition:
|
1653
1701
|
Description: 'Do not use nested method definitions.'
|
@@ -1667,6 +1715,11 @@ Lint/NextWithoutAccumulator:
|
|
1667
1715
|
Enabled: true
|
1668
1716
|
VersionAdded: '0.36'
|
1669
1717
|
|
1718
|
+
Lint/NoReturnInBeginEndBlocks:
|
1719
|
+
Description: 'Do not `return` inside `begin..end` blocks in assignment contexts.'
|
1720
|
+
Enabled: pending
|
1721
|
+
VersionAdded: '1.2'
|
1722
|
+
|
1670
1723
|
Lint/NonDeterministicRequireOrder:
|
1671
1724
|
Description: 'Always sort arrays returned by Dir.glob when requiring files.'
|
1672
1725
|
Enabled: true
|
@@ -1682,8 +1735,12 @@ Lint/NumberConversion:
|
|
1682
1735
|
Description: 'Checks unsafe usage of number conversion methods.'
|
1683
1736
|
Enabled: false
|
1684
1737
|
VersionAdded: '0.53'
|
1685
|
-
VersionChanged: '
|
1738
|
+
VersionChanged: '1.1'
|
1686
1739
|
SafeAutoCorrect: false
|
1740
|
+
IgnoredMethods: []
|
1741
|
+
IgnoredClasses:
|
1742
|
+
- Time
|
1743
|
+
- DateTime
|
1687
1744
|
|
1688
1745
|
Lint/OrderedMagicComments:
|
1689
1746
|
Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.'
|
@@ -1692,7 +1749,7 @@ Lint/OrderedMagicComments:
|
|
1692
1749
|
|
1693
1750
|
Lint/OutOfRangeRegexpRef:
|
1694
1751
|
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
1695
|
-
Enabled:
|
1752
|
+
Enabled: true
|
1696
1753
|
Safe: false
|
1697
1754
|
VersionAdded: '0.89'
|
1698
1755
|
|
@@ -1721,7 +1778,7 @@ Lint/PercentSymbolArray:
|
|
1721
1778
|
Lint/RaiseException:
|
1722
1779
|
Description: Checks for `raise` or `fail` statements which are raising `Exception` class.
|
1723
1780
|
StyleGuide: '#raise-exception'
|
1724
|
-
Enabled:
|
1781
|
+
Enabled: true
|
1725
1782
|
Safe: false
|
1726
1783
|
VersionAdded: '0.81'
|
1727
1784
|
VersionChanged: '0.86'
|
@@ -1755,18 +1812,16 @@ Lint/RedundantRequireStatement:
|
|
1755
1812
|
|
1756
1813
|
Lint/RedundantSafeNavigation:
|
1757
1814
|
Description: 'Checks for redundant safe navigation calls.'
|
1758
|
-
Enabled:
|
1815
|
+
Enabled: true
|
1759
1816
|
VersionAdded: '0.93'
|
1817
|
+
AllowedMethods:
|
1818
|
+
- instance_of?
|
1819
|
+
- kind_of?
|
1820
|
+
- is_a?
|
1821
|
+
- eql?
|
1822
|
+
- respond_to?
|
1823
|
+
- equal?
|
1760
1824
|
Safe: false
|
1761
|
-
IgnoredMethods:
|
1762
|
-
- to_c
|
1763
|
-
- to_f
|
1764
|
-
- to_i
|
1765
|
-
- to_r
|
1766
|
-
- rationalize
|
1767
|
-
- public_send
|
1768
|
-
- send
|
1769
|
-
- __send__
|
1770
1825
|
|
1771
1826
|
Lint/RedundantSplatExpansion:
|
1772
1827
|
Description: 'Checks for splat unnecessarily being called on literals.'
|
@@ -1810,7 +1865,7 @@ Lint/RescueException:
|
|
1810
1865
|
StyleGuide: '#no-blind-rescues'
|
1811
1866
|
Enabled: true
|
1812
1867
|
VersionAdded: '0.9'
|
1813
|
-
VersionChanged: '0.27
|
1868
|
+
VersionChanged: '0.27'
|
1814
1869
|
|
1815
1870
|
Lint/RescueType:
|
1816
1871
|
Description: 'Avoid rescuing from non constants that could result in a `TypeError`.'
|
@@ -1864,7 +1919,7 @@ Lint/ScriptPermission:
|
|
1864
1919
|
|
1865
1920
|
Lint/SelfAssignment:
|
1866
1921
|
Description: 'Checks for self-assignments.'
|
1867
|
-
Enabled:
|
1922
|
+
Enabled: true
|
1868
1923
|
VersionAdded: '0.89'
|
1869
1924
|
|
1870
1925
|
Lint/SendWithMixinArgument:
|
@@ -1895,7 +1950,7 @@ Lint/ShadowingOuterLocalVariable:
|
|
1895
1950
|
|
1896
1951
|
Lint/StructNewOverride:
|
1897
1952
|
Description: 'Disallow overriding the `Struct` built-in methods via `Struct.new`.'
|
1898
|
-
Enabled:
|
1953
|
+
Enabled: true
|
1899
1954
|
VersionAdded: '0.81'
|
1900
1955
|
|
1901
1956
|
Lint/SuppressedException:
|
@@ -1912,6 +1967,11 @@ Lint/Syntax:
|
|
1912
1967
|
VersionAdded: '0.9'
|
1913
1968
|
|
1914
1969
|
|
1970
|
+
Lint/ToEnumArguments:
|
1971
|
+
Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.'
|
1972
|
+
Enabled: pending
|
1973
|
+
VersionAdded: '1.1'
|
1974
|
+
|
1915
1975
|
Lint/ToJSON:
|
1916
1976
|
Description: 'Ensure #to_json includes an optional argument.'
|
1917
1977
|
Enabled: true
|
@@ -1919,12 +1979,12 @@ Lint/ToJSON:
|
|
1919
1979
|
|
1920
1980
|
Lint/TopLevelReturnWithArgument:
|
1921
1981
|
Description: 'This cop detects top level return statements with argument.'
|
1922
|
-
Enabled:
|
1982
|
+
Enabled: true
|
1923
1983
|
VersionAdded: '0.89'
|
1924
1984
|
|
1925
1985
|
Lint/TrailingCommaInAttributeDeclaration:
|
1926
1986
|
Description: 'This cop checks for trailing commas in attribute declarations.'
|
1927
|
-
Enabled:
|
1987
|
+
Enabled: true
|
1928
1988
|
VersionAdded: '0.90'
|
1929
1989
|
|
1930
1990
|
Lint/UnderscorePrefixedVariableName:
|
@@ -1938,6 +1998,11 @@ Lint/UnifiedInteger:
|
|
1938
1998
|
Enabled: true
|
1939
1999
|
VersionAdded: '0.43'
|
1940
2000
|
|
2001
|
+
Lint/UnmodifiedReduceAccumulator:
|
2002
|
+
Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration.
|
2003
|
+
Enabled: pending
|
2004
|
+
VersionAdded: '1.1'
|
2005
|
+
|
1941
2006
|
Lint/UnreachableCode:
|
1942
2007
|
Description: 'Unreachable code.'
|
1943
2008
|
Enabled: true
|
@@ -1945,7 +2010,7 @@ Lint/UnreachableCode:
|
|
1945
2010
|
|
1946
2011
|
Lint/UnreachableLoop:
|
1947
2012
|
Description: 'This cop checks for loops that will have at most one iteration.'
|
1948
|
-
Enabled:
|
2013
|
+
Enabled: true
|
1949
2014
|
VersionAdded: '0.89'
|
1950
2015
|
|
1951
2016
|
Lint/UnusedBlockArgument:
|
@@ -2004,7 +2069,7 @@ Lint/UselessElseWithoutRescue:
|
|
2004
2069
|
|
2005
2070
|
Lint/UselessMethodDefinition:
|
2006
2071
|
Description: 'Checks for useless method definitions.'
|
2007
|
-
Enabled:
|
2072
|
+
Enabled: true
|
2008
2073
|
VersionAdded: '0.90'
|
2009
2074
|
Safe: false
|
2010
2075
|
AllowComments: true
|
@@ -2012,13 +2077,14 @@ Lint/UselessMethodDefinition:
|
|
2012
2077
|
Lint/UselessSetterCall:
|
2013
2078
|
Description: 'Checks for useless setter call to a local variable.'
|
2014
2079
|
Enabled: true
|
2080
|
+
SafeAutoCorrect: false
|
2015
2081
|
VersionAdded: '0.13'
|
2016
|
-
VersionChanged: '
|
2082
|
+
VersionChanged: '1.2'
|
2017
2083
|
Safe: false
|
2018
2084
|
|
2019
2085
|
Lint/UselessTimes:
|
2020
2086
|
Description: 'Checks for useless `Integer#times` calls.'
|
2021
|
-
Enabled:
|
2087
|
+
Enabled: true
|
2022
2088
|
VersionAdded: '0.91'
|
2023
2089
|
Safe: false
|
2024
2090
|
|
@@ -2157,6 +2223,7 @@ Naming/BinaryOperatorParameterName:
|
|
2157
2223
|
StyleGuide: '#other-arg'
|
2158
2224
|
Enabled: true
|
2159
2225
|
VersionAdded: '0.50'
|
2226
|
+
VersionChanged: '1.2'
|
2160
2227
|
|
2161
2228
|
Naming/BlockParameterName:
|
2162
2229
|
Description: >-
|
@@ -2263,6 +2330,7 @@ Naming/HeredocDelimiterCase:
|
|
2263
2330
|
StyleGuide: '#heredoc-delimiters'
|
2264
2331
|
Enabled: true
|
2265
2332
|
VersionAdded: '0.50'
|
2333
|
+
VersionChanged: '1.2'
|
2266
2334
|
EnforcedStyle: uppercase
|
2267
2335
|
SupportedStyles:
|
2268
2336
|
- lowercase
|
@@ -2281,7 +2349,7 @@ Naming/MemoizedInstanceVariableName:
|
|
2281
2349
|
Memoized method name should match memo instance variable name.
|
2282
2350
|
Enabled: true
|
2283
2351
|
VersionAdded: '0.53'
|
2284
|
-
VersionChanged: '
|
2352
|
+
VersionChanged: '1.2'
|
2285
2353
|
EnforcedStyleForLeadingUnderscores: disallowed
|
2286
2354
|
SupportedStylesForLeadingUnderscores:
|
2287
2355
|
- disallowed
|
@@ -2379,14 +2447,19 @@ Naming/VariableName:
|
|
2379
2447
|
- camelCase
|
2380
2448
|
|
2381
2449
|
Naming/VariableNumber:
|
2382
|
-
Description: 'Use the configured style when numbering variables.'
|
2450
|
+
Description: 'Use the configured style when numbering symbols, methods and variables.'
|
2451
|
+
StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
|
2383
2452
|
Enabled: true
|
2384
2453
|
VersionAdded: '0.50'
|
2454
|
+
VersionChanged: '1.3'
|
2385
2455
|
EnforcedStyle: normalcase
|
2386
2456
|
SupportedStyles:
|
2387
2457
|
- snake_case
|
2388
2458
|
- normalcase
|
2389
2459
|
- non_integer
|
2460
|
+
CheckMethodNames: true
|
2461
|
+
CheckSymbols: true
|
2462
|
+
AllowedIdentifiers: []
|
2390
2463
|
|
2391
2464
|
#################### Security ##############################
|
2392
2465
|
|
@@ -2417,9 +2490,10 @@ Security/MarshalLoad:
|
|
2417
2490
|
VersionAdded: '0.47'
|
2418
2491
|
|
2419
2492
|
Security/Open:
|
2420
|
-
Description: 'The use of Kernel#open
|
2493
|
+
Description: 'The use of `Kernel#open` and `URI.open` represent a serious security risk.'
|
2421
2494
|
Enabled: true
|
2422
2495
|
VersionAdded: '0.53'
|
2496
|
+
VersionChanged: '1.0'
|
2423
2497
|
Safe: false
|
2424
2498
|
|
2425
2499
|
Security/YAMLLoad:
|
@@ -2446,7 +2520,7 @@ Style/AccessModifierDeclarations:
|
|
2446
2520
|
|
2447
2521
|
Style/AccessorGrouping:
|
2448
2522
|
Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
|
2449
|
-
Enabled:
|
2523
|
+
Enabled: true
|
2450
2524
|
VersionAdded: '0.87'
|
2451
2525
|
EnforcedStyle: grouped
|
2452
2526
|
SupportedStyles:
|
@@ -2479,6 +2553,13 @@ Style/AndOr:
|
|
2479
2553
|
- always
|
2480
2554
|
- conditionals
|
2481
2555
|
|
2556
|
+
Style/ArgumentsForwarding:
|
2557
|
+
Description: 'Use arguments forwarding.'
|
2558
|
+
StyleGuide: '#arguments-forwarding'
|
2559
|
+
Enabled: pending
|
2560
|
+
AllowOnlyRestArgument: true
|
2561
|
+
VersionAdded: '1.1'
|
2562
|
+
|
2482
2563
|
Style/ArrayCoercion:
|
2483
2564
|
Description: >-
|
2484
2565
|
Use Array() instead of explicit Array check or [*var], when dealing
|
@@ -2535,7 +2616,7 @@ Style/BisectedAttrAccessor:
|
|
2535
2616
|
Description: >-
|
2536
2617
|
Checks for places where `attr_reader` and `attr_writer`
|
2537
2618
|
for the same method can be combined into single `attr_accessor`.
|
2538
|
-
Enabled:
|
2619
|
+
Enabled: true
|
2539
2620
|
VersionAdded: '0.87'
|
2540
2621
|
|
2541
2622
|
Style/BlockComments:
|
@@ -2674,7 +2755,7 @@ Style/CaseEquality:
|
|
2674
2755
|
Style/CaseLikeIf:
|
2675
2756
|
Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.'
|
2676
2757
|
StyleGuide: '#case-vs-if-else'
|
2677
|
-
Enabled:
|
2758
|
+
Enabled: true
|
2678
2759
|
Safe: false
|
2679
2760
|
VersionAdded: '0.88'
|
2680
2761
|
|
@@ -2727,7 +2808,7 @@ Style/ClassCheck:
|
|
2727
2808
|
Style/ClassEqualityComparison:
|
2728
2809
|
Description: 'Enforces the use of `Object#instance_of?` instead of class comparison for equality.'
|
2729
2810
|
StyleGuide: '#instance-of-vs-class-comparison'
|
2730
|
-
Enabled:
|
2811
|
+
Enabled: true
|
2731
2812
|
VersionAdded: '0.93'
|
2732
2813
|
IgnoredMethods:
|
2733
2814
|
- ==
|
@@ -2757,6 +2838,13 @@ Style/ClassVars:
|
|
2757
2838
|
Enabled: true
|
2758
2839
|
VersionAdded: '0.13'
|
2759
2840
|
|
2841
|
+
Style/CollectionCompact:
|
2842
|
+
Description: 'Use `{Array,Hash}#{compact,compact!}` instead of custom logic to reject nils.'
|
2843
|
+
Enabled: pending
|
2844
|
+
Safe: false
|
2845
|
+
VersionAdded: '1.2'
|
2846
|
+
VersionChanged: '1.3'
|
2847
|
+
|
2760
2848
|
# Align with the style guide.
|
2761
2849
|
Style/CollectionMethods:
|
2762
2850
|
Description: 'Preferred collection methods.'
|
@@ -2795,7 +2883,7 @@ Style/CombinableLoops:
|
|
2795
2883
|
Description: >-
|
2796
2884
|
Checks for places where multiple consecutive loops over the same data
|
2797
2885
|
can be combined into a single loop.
|
2798
|
-
Enabled:
|
2886
|
+
Enabled: true
|
2799
2887
|
Safe: false
|
2800
2888
|
VersionAdded: '0.90'
|
2801
2889
|
|
@@ -2820,17 +2908,18 @@ Style/CommandLiteral:
|
|
2820
2908
|
Style/CommentAnnotation:
|
2821
2909
|
Description: >-
|
2822
2910
|
Checks formatting of special comments
|
2823
|
-
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
2911
|
+
(TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE).
|
2824
2912
|
StyleGuide: '#annotate-keywords'
|
2825
2913
|
Enabled: true
|
2826
2914
|
VersionAdded: '0.10'
|
2827
|
-
VersionChanged: '
|
2915
|
+
VersionChanged: '1.3'
|
2828
2916
|
Keywords:
|
2829
2917
|
- TODO
|
2830
2918
|
- FIXME
|
2831
2919
|
- OPTIMIZE
|
2832
2920
|
- HACK
|
2833
2921
|
- REVIEW
|
2922
|
+
- NOTE
|
2834
2923
|
|
2835
2924
|
Style/CommentedKeyword:
|
2836
2925
|
Description: 'Do not place comments on the same line as certain keywords.'
|
@@ -2919,6 +3008,15 @@ Style/DisableCopsWithinSourceCodeDirective:
|
|
2919
3008
|
Enabled: false
|
2920
3009
|
VersionAdded: '0.82'
|
2921
3010
|
|
3011
|
+
Style/DocumentDynamicEvalDefinition:
|
3012
|
+
Description: >-
|
3013
|
+
When using `class_eval` (or other `eval`) with string interpolation,
|
3014
|
+
add a comment block showing its appearance if interpolated.
|
3015
|
+
StyleGuide: '#eval-comment-docs'
|
3016
|
+
Enabled: pending
|
3017
|
+
VersionAdded: '1.1'
|
3018
|
+
VersionChanged: '1.3'
|
3019
|
+
|
2922
3020
|
Style/Documentation:
|
2923
3021
|
Description: 'Document classes and non-namespace modules.'
|
2924
3022
|
Enabled: true
|
@@ -2946,7 +3044,7 @@ Style/DoubleNegation:
|
|
2946
3044
|
StyleGuide: '#no-bang-bang'
|
2947
3045
|
Enabled: true
|
2948
3046
|
VersionAdded: '0.19'
|
2949
|
-
VersionChanged: '
|
3047
|
+
VersionChanged: '1.2'
|
2950
3048
|
EnforcedStyle: allowed_in_returns
|
2951
3049
|
SafeAutoCorrect: false
|
2952
3050
|
SupportedStyles:
|
@@ -3048,7 +3146,7 @@ Style/ExplicitBlockArgument:
|
|
3048
3146
|
Consider using explicit block argument to avoid writing block literal
|
3049
3147
|
that just passes its arguments to another block.
|
3050
3148
|
StyleGuide: '#block-argument'
|
3051
|
-
Enabled:
|
3149
|
+
Enabled: true
|
3052
3150
|
# May change the yielding arity.
|
3053
3151
|
Safe: false
|
3054
3152
|
VersionAdded: '0.89'
|
@@ -3056,7 +3154,7 @@ Style/ExplicitBlockArgument:
|
|
3056
3154
|
Style/ExponentialNotation:
|
3057
3155
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
3058
3156
|
StyleGuide: '#exponential-notation'
|
3059
|
-
Enabled:
|
3157
|
+
Enabled: true
|
3060
3158
|
VersionAdded: '0.82'
|
3061
3159
|
EnforcedStyle: scientific
|
3062
3160
|
SupportedStyles:
|
@@ -3111,8 +3209,12 @@ Style/FormatStringToken:
|
|
3111
3209
|
# Prefer simple looking "template" style tokens like `%{name}`, `%{age}`
|
3112
3210
|
- template
|
3113
3211
|
- unannotated
|
3212
|
+
# `MaxUnannotatedPlaceholdersAllowed` defines the number of `unannotated`
|
3213
|
+
# style token in a format string to be allowed when enforced style is not
|
3214
|
+
# `unannotated`.
|
3215
|
+
MaxUnannotatedPlaceholdersAllowed: 1
|
3114
3216
|
VersionAdded: '0.49'
|
3115
|
-
VersionChanged: '0
|
3217
|
+
VersionChanged: '1.0'
|
3116
3218
|
|
3117
3219
|
Style/FrozenStringLiteralComment:
|
3118
3220
|
Description: >-
|
@@ -3139,7 +3241,7 @@ Style/FrozenStringLiteralComment:
|
|
3139
3241
|
Style/GlobalStdStream:
|
3140
3242
|
Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
|
3141
3243
|
StyleGuide: '#global-stdout'
|
3142
|
-
Enabled:
|
3244
|
+
Enabled: true
|
3143
3245
|
VersionAdded: '0.89'
|
3144
3246
|
SafeAutoCorrect: false
|
3145
3247
|
|
@@ -3167,7 +3269,7 @@ Style/HashAsLastArrayItem:
|
|
3167
3269
|
Checks for presence or absence of braces around hash literal as a last
|
3168
3270
|
array item depending on configuration.
|
3169
3271
|
StyleGuide: '#hash-literal-as-last-array-item'
|
3170
|
-
Enabled:
|
3272
|
+
Enabled: true
|
3171
3273
|
VersionAdded: '0.88'
|
3172
3274
|
EnforcedStyle: braces
|
3173
3275
|
SupportedStyles:
|
@@ -3177,7 +3279,7 @@ Style/HashAsLastArrayItem:
|
|
3177
3279
|
Style/HashEachMethods:
|
3178
3280
|
Description: 'Use Hash#each_key and Hash#each_value.'
|
3179
3281
|
StyleGuide: '#hash-each'
|
3180
|
-
Enabled:
|
3282
|
+
Enabled: true
|
3181
3283
|
VersionAdded: '0.80'
|
3182
3284
|
Safe: false
|
3183
3285
|
|
@@ -3185,7 +3287,7 @@ Style/HashLikeCase:
|
|
3185
3287
|
Description: >-
|
3186
3288
|
Checks for places where `case-when` represents a simple 1:1
|
3187
3289
|
mapping and can be replaced with a hash lookup.
|
3188
|
-
Enabled:
|
3290
|
+
Enabled: true
|
3189
3291
|
VersionAdded: '0.88'
|
3190
3292
|
# `MinBranchesCount` defines the number of branches `case` needs to have
|
3191
3293
|
# to trigger this cop
|
@@ -3216,14 +3318,14 @@ Style/HashSyntax:
|
|
3216
3318
|
|
3217
3319
|
Style/HashTransformKeys:
|
3218
3320
|
Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.'
|
3219
|
-
Enabled:
|
3321
|
+
Enabled: true
|
3220
3322
|
VersionAdded: '0.80'
|
3221
3323
|
VersionChanged: '0.90'
|
3222
3324
|
Safe: false
|
3223
3325
|
|
3224
3326
|
Style/HashTransformValues:
|
3225
3327
|
Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.'
|
3226
|
-
Enabled:
|
3328
|
+
Enabled: true
|
3227
3329
|
VersionAdded: '0.80'
|
3228
3330
|
VersionChanged: '0.90'
|
3229
3331
|
Safe: false
|
@@ -3241,6 +3343,7 @@ Style/IfInsideElse:
|
|
3241
3343
|
Enabled: true
|
3242
3344
|
AllowIfModifier: false
|
3243
3345
|
VersionAdded: '0.36'
|
3346
|
+
VersionChanged: '1.3'
|
3244
3347
|
|
3245
3348
|
Style/IfUnlessModifier:
|
3246
3349
|
Description: >-
|
@@ -3273,12 +3376,14 @@ Style/ImplicitRuntimeError:
|
|
3273
3376
|
VersionAdded: '0.41'
|
3274
3377
|
|
3275
3378
|
Style/InfiniteLoop:
|
3276
|
-
Description:
|
3379
|
+
Description: >-
|
3380
|
+
Use Kernel#loop for infinite loops.
|
3381
|
+
This cop is unsafe in the body may raise a `StopIteration` exception.
|
3382
|
+
Safe: false
|
3277
3383
|
StyleGuide: '#infinite-loop'
|
3278
3384
|
Enabled: true
|
3279
3385
|
VersionAdded: '0.26'
|
3280
3386
|
VersionChanged: '0.61'
|
3281
|
-
SafeAutoCorrect: true
|
3282
3387
|
|
3283
3388
|
Style/InlineComment:
|
3284
3389
|
Description: 'Avoid trailing inline comments.'
|
@@ -3330,7 +3435,7 @@ Style/IpAddresses:
|
|
3330
3435
|
Style/KeywordParametersOrder:
|
3331
3436
|
Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.'
|
3332
3437
|
StyleGuide: '#keyword-parameters-order'
|
3333
|
-
Enabled:
|
3438
|
+
Enabled: true
|
3334
3439
|
VersionAdded: '0.90'
|
3335
3440
|
|
3336
3441
|
Style/Lambda:
|
@@ -3532,6 +3637,7 @@ Style/MultipleComparison:
|
|
3532
3637
|
use Array#include? instead.
|
3533
3638
|
Enabled: true
|
3534
3639
|
VersionAdded: '0.49'
|
3640
|
+
VersionChanged: '1.1'
|
3535
3641
|
|
3536
3642
|
Style/MutableConstant:
|
3537
3643
|
Description: 'Do not assign mutable objects to constants.'
|
@@ -3566,6 +3672,13 @@ Style/NegatedIf:
|
|
3566
3672
|
- prefix
|
3567
3673
|
- postfix
|
3568
3674
|
|
3675
|
+
Style/NegatedIfElseCondition:
|
3676
|
+
Description: >-
|
3677
|
+
This cop checks for uses of `if-else` and ternary operators with a negated condition
|
3678
|
+
which can be simplified by inverting condition and swapping branches.
|
3679
|
+
Enabled: pending
|
3680
|
+
VersionAdded: '1.2'
|
3681
|
+
|
3569
3682
|
Style/NegatedUnless:
|
3570
3683
|
Description: 'Favor if over unless for negative conditions.'
|
3571
3684
|
StyleGuide: '#if-for-negatives'
|
@@ -3653,6 +3766,11 @@ Style/NilComparison:
|
|
3653
3766
|
- predicate
|
3654
3767
|
- comparison
|
3655
3768
|
|
3769
|
+
Style/NilLambda:
|
3770
|
+
Description: 'Prefer `-> {}` to `-> { nil }`.'
|
3771
|
+
Enabled: pending
|
3772
|
+
VersionAdded: '1.3'
|
3773
|
+
|
3656
3774
|
Style/NonNilCheck:
|
3657
3775
|
Description: 'Checks for redundant nil checks.'
|
3658
3776
|
StyleGuide: '#no-non-nil-checks'
|
@@ -3755,7 +3873,7 @@ Style/OptionalArguments:
|
|
3755
3873
|
Style/OptionalBooleanParameter:
|
3756
3874
|
Description: 'Use keyword arguments when defining method with boolean argument.'
|
3757
3875
|
StyleGuide: '#boolean-keyword-arguments'
|
3758
|
-
Enabled:
|
3876
|
+
Enabled: true
|
3759
3877
|
Safe: false
|
3760
3878
|
VersionAdded: '0.89'
|
3761
3879
|
AllowedMethods:
|
@@ -3802,7 +3920,7 @@ Style/PercentLiteralDelimiters:
|
|
3802
3920
|
'%r': '{}'
|
3803
3921
|
'%w': '[]'
|
3804
3922
|
'%W': '[]'
|
3805
|
-
VersionChanged: '0.48
|
3923
|
+
VersionChanged: '0.48'
|
3806
3924
|
|
3807
3925
|
Style/PercentQLiterals:
|
3808
3926
|
Description: 'Checks if uses of %Q/%q match the configured preference.'
|
@@ -3843,11 +3961,12 @@ Style/RaiseArgs:
|
|
3843
3961
|
StyleGuide: '#exception-class-messages'
|
3844
3962
|
Enabled: true
|
3845
3963
|
VersionAdded: '0.14'
|
3846
|
-
VersionChanged: '
|
3964
|
+
VersionChanged: '1.2'
|
3847
3965
|
EnforcedStyle: exploded
|
3848
3966
|
SupportedStyles:
|
3849
3967
|
- compact # raise Exception.new(msg)
|
3850
3968
|
- exploded # raise Exception, msg
|
3969
|
+
AllowedCompactTypes: []
|
3851
3970
|
|
3852
3971
|
Style/RandomWithOffset:
|
3853
3972
|
Description: >-
|
@@ -3859,7 +3978,7 @@ Style/RandomWithOffset:
|
|
3859
3978
|
|
3860
3979
|
Style/RedundantAssignment:
|
3861
3980
|
Description: 'Checks for redundant assignment before returning.'
|
3862
|
-
Enabled:
|
3981
|
+
Enabled: true
|
3863
3982
|
VersionAdded: '0.87'
|
3864
3983
|
|
3865
3984
|
Style/RedundantBegin:
|
@@ -3896,7 +4015,7 @@ Style/RedundantFetchBlock:
|
|
3896
4015
|
Use `fetch(key, value)` instead of `fetch(key) { value }`
|
3897
4016
|
when value has Numeric, Rational, Complex, Symbol or String type, `false`, `true`, `nil` or is a constant.
|
3898
4017
|
Reference: 'https://github.com/JuanitoFatas/fast-ruby#hashfetch-with-argument-vs-hashfetch--block-code'
|
3899
|
-
Enabled:
|
4018
|
+
Enabled: true
|
3900
4019
|
Safe: false
|
3901
4020
|
# If enabled, this cop will autocorrect usages of
|
3902
4021
|
# `fetch` being called with block returning a constant.
|
@@ -3909,7 +4028,7 @@ Style/RedundantFileExtensionInRequire:
|
|
3909
4028
|
Checks for the presence of superfluous `.rb` extension in
|
3910
4029
|
the filename provided to `require` and `require_relative`.
|
3911
4030
|
StyleGuide: '#no-explicit-rb-to-require'
|
3912
|
-
Enabled:
|
4031
|
+
Enabled: true
|
3913
4032
|
VersionAdded: '0.88'
|
3914
4033
|
|
3915
4034
|
Style/RedundantFreeze:
|
@@ -3936,12 +4055,12 @@ Style/RedundantPercentQ:
|
|
3936
4055
|
|
3937
4056
|
Style/RedundantRegexpCharacterClass:
|
3938
4057
|
Description: 'Checks for unnecessary single-element Regexp character classes.'
|
3939
|
-
Enabled:
|
4058
|
+
Enabled: true
|
3940
4059
|
VersionAdded: '0.85'
|
3941
4060
|
|
3942
4061
|
Style/RedundantRegexpEscape:
|
3943
4062
|
Description: 'Checks for redundant escapes in Regexps.'
|
3944
|
-
Enabled:
|
4063
|
+
Enabled: true
|
3945
4064
|
VersionAdded: '0.85'
|
3946
4065
|
|
3947
4066
|
Style/RedundantReturn:
|
@@ -3962,7 +4081,7 @@ Style/RedundantSelf:
|
|
3962
4081
|
|
3963
4082
|
Style/RedundantSelfAssignment:
|
3964
4083
|
Description: 'Checks for places where redundant assignments are made for in place modification methods.'
|
3965
|
-
Enabled:
|
4084
|
+
Enabled: true
|
3966
4085
|
Safe: false
|
3967
4086
|
VersionAdded: '0.90'
|
3968
4087
|
|
@@ -4090,7 +4209,7 @@ Style/SignalException:
|
|
4090
4209
|
|
4091
4210
|
Style/SingleArgumentDig:
|
4092
4211
|
Description: 'Avoid using single argument dig method.'
|
4093
|
-
Enabled:
|
4212
|
+
Enabled: true
|
4094
4213
|
VersionAdded: '0.89'
|
4095
4214
|
Safe: false
|
4096
4215
|
|
@@ -4117,7 +4236,7 @@ Style/SingleLineMethods:
|
|
4117
4236
|
|
4118
4237
|
Style/SlicingWithRange:
|
4119
4238
|
Description: 'Checks array slicing is done with endless ranges when suitable.'
|
4120
|
-
Enabled:
|
4239
|
+
Enabled: true
|
4121
4240
|
VersionAdded: '0.83'
|
4122
4241
|
Safe: false
|
4123
4242
|
|
@@ -4125,7 +4244,7 @@ Style/SoleNestedConditional:
|
|
4125
4244
|
Description: >-
|
4126
4245
|
Finds sole nested conditional nodes
|
4127
4246
|
which can be merged into outer conditional node.
|
4128
|
-
Enabled:
|
4247
|
+
Enabled: true
|
4129
4248
|
VersionAdded: '0.89'
|
4130
4249
|
AllowModifier: false
|
4131
4250
|
|
@@ -4151,6 +4270,13 @@ Style/StabbyLambdaParentheses:
|
|
4151
4270
|
- require_parentheses
|
4152
4271
|
- require_no_parentheses
|
4153
4272
|
|
4273
|
+
Style/StaticClass:
|
4274
|
+
Description: 'Prefer modules to classes with only class methods.'
|
4275
|
+
StyleGuide: '#modules-vs-classes'
|
4276
|
+
Enabled: false
|
4277
|
+
Safe: false
|
4278
|
+
VersionAdded: '1.3'
|
4279
|
+
|
4154
4280
|
Style/StderrPuts:
|
4155
4281
|
Description: 'Use `warn` instead of `$stderr.puts`.'
|
4156
4282
|
StyleGuide: '#warn'
|
@@ -4160,7 +4286,7 @@ Style/StderrPuts:
|
|
4160
4286
|
Style/StringConcatenation:
|
4161
4287
|
Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
|
4162
4288
|
StyleGuide: '#string-interpolation'
|
4163
|
-
Enabled:
|
4289
|
+
Enabled: true
|
4164
4290
|
Safe: false
|
4165
4291
|
VersionAdded: '0.89'
|
4166
4292
|
|
@@ -4201,7 +4327,7 @@ Style/StringMethods:
|
|
4201
4327
|
Description: 'Checks if configured preferred methods are used over non-preferred.'
|
4202
4328
|
Enabled: false
|
4203
4329
|
VersionAdded: '0.34'
|
4204
|
-
VersionChanged: '0.34
|
4330
|
+
VersionChanged: '0.34'
|
4205
4331
|
# Mapping from undesired method to desired_method
|
4206
4332
|
# e.g. to use `to_sym` over `intern`:
|
4207
4333
|
#
|
@@ -4223,6 +4349,13 @@ Style/StructInheritance:
|
|
4223
4349
|
VersionAdded: '0.29'
|
4224
4350
|
VersionChanged: '0.86'
|
4225
4351
|
|
4352
|
+
Style/SwapValues:
|
4353
|
+
Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.'
|
4354
|
+
StyleGuide: '#values-swapping'
|
4355
|
+
Enabled: pending
|
4356
|
+
VersionAdded: '1.1'
|
4357
|
+
SafeAutoCorrect: false
|
4358
|
+
|
4226
4359
|
Style/SymbolArray:
|
4227
4360
|
Description: 'Use %i or %I for arrays of symbols.'
|
4228
4361
|
StyleGuide: '#percent-i'
|