rubocop 0.88.0 → 0.89.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/rubocop-profile +1 -0
- data/config/default.yml +96 -16
- data/lib/rubocop.rb +16 -4
- data/lib/rubocop/cli/command/auto_genenerate_config.rb +1 -1
- data/lib/rubocop/cli/command/base.rb +1 -0
- data/lib/rubocop/cli/command/execute_runner.rb +1 -1
- data/lib/rubocop/cli/command/show_cops.rb +2 -2
- data/lib/rubocop/cli/command/version.rb +2 -2
- data/lib/rubocop/comment_config.rb +5 -7
- data/lib/rubocop/config.rb +20 -3
- data/lib/rubocop/config_loader.rb +2 -2
- data/lib/rubocop/config_loader_resolver.rb +3 -3
- data/lib/rubocop/config_obsoletion.rb +6 -1
- data/lib/rubocop/config_validator.rb +2 -4
- data/lib/rubocop/cop/base.rb +2 -2
- data/lib/rubocop/cop/commissioner.rb +0 -1
- data/lib/rubocop/cop/correctors/line_break_corrector.rb +4 -4
- data/lib/rubocop/cop/correctors/percent_literal_corrector.rb +2 -2
- data/lib/rubocop/cop/correctors/punctuation_corrector.rb +1 -1
- data/lib/rubocop/cop/correctors/unused_arg_corrector.rb +15 -18
- data/lib/rubocop/cop/force.rb +1 -0
- data/lib/rubocop/cop/gemspec/required_ruby_version.rb +32 -11
- data/lib/rubocop/cop/generator/configuration_injector.rb +2 -2
- data/lib/rubocop/cop/internal_affairs/method_name_equal.rb +4 -12
- data/lib/rubocop/cop/internal_affairs/node_destructuring.rb +1 -1
- data/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +8 -8
- data/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +10 -7
- data/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +7 -8
- data/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +2 -2
- data/lib/rubocop/cop/layout/block_alignment.rb +1 -1
- data/lib/rubocop/cop/layout/class_structure.rb +3 -7
- data/lib/rubocop/cop/layout/comment_indentation.rb +1 -1
- data/lib/rubocop/cop/layout/empty_lines.rb +0 -2
- data/lib/rubocop/cop/layout/extra_spacing.rb +22 -36
- data/lib/rubocop/cop/layout/first_method_argument_line_break.rb +1 -1
- data/lib/rubocop/cop/layout/heredoc_indentation.rb +2 -2
- data/lib/rubocop/cop/layout/indentation_style.rb +0 -2
- data/lib/rubocop/cop/layout/leading_comment_space.rb +1 -1
- data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +1 -1
- data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +0 -2
- data/lib/rubocop/cop/layout/space_around_method_call_operator.rb +9 -1
- data/lib/rubocop/cop/lint/ambiguous_block_association.rb +7 -4
- data/lib/rubocop/cop/lint/ambiguous_operator.rb +15 -10
- data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +11 -13
- data/lib/rubocop/cop/lint/assignment_in_condition.rb +2 -2
- data/lib/rubocop/cop/lint/big_decimal_new.rb +10 -10
- data/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +50 -0
- data/lib/rubocop/cop/lint/boolean_symbol.rb +16 -11
- data/lib/rubocop/cop/lint/circular_argument_reference.rb +1 -1
- data/lib/rubocop/cop/lint/constant_resolution.rb +1 -1
- data/lib/rubocop/cop/lint/debugger.rb +7 -1
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +9 -10
- data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +17 -13
- data/lib/rubocop/cop/lint/duplicate_case_condition.rb +1 -1
- data/lib/rubocop/cop/lint/duplicate_hash_key.rb +1 -1
- data/lib/rubocop/cop/lint/duplicate_methods.rb +7 -4
- data/lib/rubocop/cop/lint/duplicate_rescue_exception.rb +60 -0
- data/lib/rubocop/cop/lint/each_with_object_argument.rb +1 -1
- data/lib/rubocop/cop/lint/else_layout.rb +1 -1
- data/lib/rubocop/cop/lint/empty_conditional_body.rb +67 -0
- data/lib/rubocop/cop/lint/empty_ensure.rb +5 -5
- data/lib/rubocop/cop/lint/empty_expression.rb +2 -2
- data/lib/rubocop/cop/lint/empty_interpolation.rb +5 -6
- data/lib/rubocop/cop/lint/empty_when.rb +2 -2
- data/lib/rubocop/cop/lint/ensure_return.rb +27 -29
- data/lib/rubocop/cop/lint/erb_new_arguments.rb +11 -10
- data/lib/rubocop/cop/lint/flip_flop.rb +1 -1
- data/lib/rubocop/cop/lint/float_comparison.rb +93 -0
- data/lib/rubocop/cop/lint/float_out_of_range.rb +1 -1
- data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +5 -4
- data/lib/rubocop/cop/lint/heredoc_method_call_position.rb +13 -14
- data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +2 -2
- data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +8 -8
- data/lib/rubocop/cop/lint/inherit_exception.rb +12 -7
- data/lib/rubocop/cop/lint/interpolation_check.rb +18 -15
- data/lib/rubocop/cop/lint/literal_as_condition.rb +4 -2
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +7 -7
- data/lib/rubocop/cop/lint/loop.rb +23 -2
- data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +6 -5
- data/lib/rubocop/cop/lint/missing_super.rb +99 -0
- data/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +1 -1
- data/lib/rubocop/cop/lint/multiple_comparison.rb +6 -9
- data/lib/rubocop/cop/lint/nested_method_definition.rb +1 -1
- data/lib/rubocop/cop/lint/nested_percent_literal.rb +1 -1
- data/lib/rubocop/cop/lint/next_without_accumulator.rb +1 -1
- data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +27 -23
- data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +2 -2
- data/lib/rubocop/cop/lint/number_conversion.rb +6 -9
- data/lib/rubocop/cop/lint/ordered_magic_comments.rb +11 -13
- data/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +90 -0
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +4 -10
- data/lib/rubocop/cop/lint/percent_string_array.rb +13 -12
- data/lib/rubocop/cop/lint/percent_symbol_array.rb +13 -12
- data/lib/rubocop/cop/lint/raise_exception.rb +12 -10
- data/lib/rubocop/cop/lint/rand_one.rb +2 -2
- data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +16 -19
- data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +7 -11
- data/lib/rubocop/cop/lint/redundant_require_statement.rb +4 -7
- data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +13 -9
- data/lib/rubocop/cop/lint/redundant_string_coercion.rb +6 -13
- data/lib/rubocop/cop/lint/redundant_with_index.rb +11 -14
- data/lib/rubocop/cop/lint/redundant_with_object.rb +11 -14
- data/lib/rubocop/cop/lint/regexp_as_condition.rb +4 -6
- data/lib/rubocop/cop/lint/require_parentheses.rb +2 -2
- data/lib/rubocop/cop/lint/rescue_exception.rb +1 -1
- data/lib/rubocop/cop/lint/rescue_type.rb +8 -8
- data/lib/rubocop/cop/lint/return_in_void_context.rb +2 -4
- data/lib/rubocop/cop/lint/safe_navigation_chain.rb +3 -6
- data/lib/rubocop/cop/lint/safe_navigation_consistency.rb +14 -10
- data/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +7 -7
- data/lib/rubocop/cop/lint/script_permission.rb +10 -7
- data/lib/rubocop/cop/lint/self_assignment.rb +78 -0
- data/lib/rubocop/cop/lint/send_with_mixin_argument.rb +5 -11
- data/lib/rubocop/cop/lint/shadowed_argument.rb +3 -3
- data/lib/rubocop/cop/lint/shadowed_exception.rb +2 -2
- data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +3 -3
- data/lib/rubocop/cop/lint/struct_new_override.rb +1 -1
- data/lib/rubocop/cop/lint/suppressed_exception.rb +4 -7
- data/lib/rubocop/cop/lint/to_json.rb +4 -6
- data/lib/rubocop/cop/lint/top_level_return_with_argument.rb +34 -0
- data/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +4 -4
- data/lib/rubocop/cop/lint/unified_integer.rb +4 -6
- data/lib/rubocop/cop/lint/unreachable_code.rb +1 -1
- data/lib/rubocop/cop/lint/unreachable_loop.rb +174 -0
- data/lib/rubocop/cop/lint/unused_block_argument.rb +8 -3
- data/lib/rubocop/cop/lint/unused_method_argument.rb +8 -3
- data/lib/rubocop/cop/lint/uri_escape_unescape.rb +1 -1
- data/lib/rubocop/cop/lint/uri_regexp.rb +11 -47
- data/lib/rubocop/cop/lint/useless_access_modifier.rb +25 -15
- data/lib/rubocop/cop/lint/useless_assignment.rb +4 -4
- data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +6 -15
- data/lib/rubocop/cop/lint/useless_setter_call.rb +4 -6
- data/lib/rubocop/cop/lint/void.rb +3 -7
- data/lib/rubocop/cop/metrics/abc_size.rb +1 -1
- data/lib/rubocop/cop/metrics/block_length.rb +2 -2
- data/lib/rubocop/cop/metrics/block_nesting.rb +2 -2
- data/lib/rubocop/cop/metrics/class_length.rb +2 -2
- data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +2 -1
- data/lib/rubocop/cop/metrics/method_length.rb +2 -2
- data/lib/rubocop/cop/metrics/module_length.rb +2 -2
- data/lib/rubocop/cop/metrics/parameter_lists.rb +2 -6
- data/lib/rubocop/cop/metrics/perceived_complexity.rb +7 -8
- data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +48 -5
- data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +52 -24
- data/lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb +37 -0
- data/lib/rubocop/cop/migration/department_name.rb +14 -16
- data/lib/rubocop/cop/mixin/alignment.rb +2 -1
- data/lib/rubocop/cop/mixin/array_min_size.rb +1 -1
- data/lib/rubocop/cop/mixin/check_line_breakable.rb +2 -2
- data/lib/rubocop/cop/mixin/code_length.rb +22 -5
- data/lib/rubocop/cop/mixin/hash_transform_method.rb +5 -11
- data/lib/rubocop/cop/mixin/line_length_help.rb +1 -3
- data/lib/rubocop/cop/mixin/method_complexity.rb +10 -2
- data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +1 -2
- data/lib/rubocop/cop/mixin/percent_array.rb +2 -6
- data/lib/rubocop/cop/mixin/range_help.rb +18 -4
- data/lib/rubocop/cop/mixin/statement_modifier.rb +37 -8
- data/lib/rubocop/cop/mixin/surrounding_space.rb +0 -25
- data/lib/rubocop/cop/mixin/trailing_comma.rb +2 -4
- data/lib/rubocop/cop/mixin/uncommunicative_name.rb +6 -13
- data/lib/rubocop/cop/mixin/unused_argument.rb +4 -6
- data/lib/rubocop/cop/naming/accessor_method_name.rb +4 -2
- data/lib/rubocop/cop/naming/ascii_identifiers.rb +3 -3
- data/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +1 -1
- data/lib/rubocop/cop/naming/block_parameter_name.rb +1 -1
- data/lib/rubocop/cop/naming/class_and_module_camel_case.rb +2 -2
- data/lib/rubocop/cop/naming/constant_name.rb +2 -2
- data/lib/rubocop/cop/naming/file_name.rb +3 -3
- data/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +2 -2
- data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +2 -2
- data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +2 -2
- data/lib/rubocop/cop/naming/method_parameter_name.rb +1 -1
- data/lib/rubocop/cop/naming/predicate_name.rb +3 -5
- data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +12 -11
- data/lib/rubocop/cop/registry.rb +3 -3
- data/lib/rubocop/cop/security/eval.rb +2 -2
- data/lib/rubocop/cop/security/json_load.rb +6 -8
- data/lib/rubocop/cop/security/marshal_load.rb +2 -4
- data/lib/rubocop/cop/security/open.rb +2 -2
- data/lib/rubocop/cop/security/yaml_load.rb +6 -6
- data/lib/rubocop/cop/style/access_modifier_declarations.rb +16 -9
- data/lib/rubocop/cop/style/accessor_grouping.rb +23 -21
- data/lib/rubocop/cop/style/alias.rb +41 -36
- data/lib/rubocop/cop/style/and_or.rb +9 -11
- data/lib/rubocop/cop/style/array_join.rb +6 -8
- data/lib/rubocop/cop/style/ascii_comments.rb +4 -4
- data/lib/rubocop/cop/style/attr.rb +11 -9
- data/lib/rubocop/cop/style/auto_resource_cleanup.rb +2 -5
- data/lib/rubocop/cop/style/bare_percent_literals.rb +10 -12
- data/lib/rubocop/cop/style/begin_block.rb +2 -2
- data/lib/rubocop/cop/style/bisected_attr_accessor.rb +9 -14
- data/lib/rubocop/cop/style/block_comments.rb +14 -18
- data/lib/rubocop/cop/style/block_delimiters.rb +23 -23
- data/lib/rubocop/cop/style/case_equality.rb +22 -3
- data/lib/rubocop/cop/style/case_like_if.rb +19 -16
- data/lib/rubocop/cop/style/class_and_module_children.rb +14 -11
- data/lib/rubocop/cop/style/class_check.rb +7 -9
- data/lib/rubocop/cop/style/class_methods.rb +7 -11
- data/lib/rubocop/cop/style/class_vars.rb +6 -10
- data/lib/rubocop/cop/style/collection_methods.rb +11 -17
- data/lib/rubocop/cop/style/colon_method_call.rb +8 -9
- data/lib/rubocop/cop/style/colon_method_definition.rb +6 -6
- data/lib/rubocop/cop/style/command_literal.rb +23 -24
- data/lib/rubocop/cop/style/comment_annotation.rb +15 -15
- data/lib/rubocop/cop/style/commented_keyword.rb +1 -1
- data/lib/rubocop/cop/style/conditional_assignment.rb +12 -3
- data/lib/rubocop/cop/style/constant_visibility.rb +3 -2
- data/lib/rubocop/cop/style/copyright.rb +12 -12
- data/lib/rubocop/cop/style/date_time.rb +1 -1
- data/lib/rubocop/cop/style/def_with_parentheses.rb +8 -10
- data/lib/rubocop/cop/style/dir.rb +7 -10
- data/lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb +7 -9
- data/lib/rubocop/cop/style/documentation.rb +6 -8
- data/lib/rubocop/cop/style/documentation_method.rb +1 -1
- data/lib/rubocop/cop/style/double_cop_disable_directive.rb +12 -15
- data/lib/rubocop/cop/style/double_negation.rb +2 -2
- data/lib/rubocop/cop/style/each_for_simple_loop.rb +5 -8
- data/lib/rubocop/cop/style/each_with_object.rb +16 -19
- data/lib/rubocop/cop/style/empty_case_condition.rb +19 -20
- data/lib/rubocop/cop/style/empty_else.rb +17 -19
- data/lib/rubocop/cop/style/empty_literal.rb +15 -16
- data/lib/rubocop/cop/style/empty_method.rb +10 -13
- data/lib/rubocop/cop/style/encoding.rb +5 -9
- data/lib/rubocop/cop/style/end_block.rb +4 -6
- data/lib/rubocop/cop/style/eval_with_location.rb +9 -7
- data/lib/rubocop/cop/style/even_odd.rb +7 -11
- data/lib/rubocop/cop/style/expand_path_arguments.rb +21 -20
- data/lib/rubocop/cop/style/explicit_block_argument.rb +102 -0
- data/lib/rubocop/cop/style/exponential_notation.rb +1 -1
- data/lib/rubocop/cop/style/float_division.rb +1 -1
- data/lib/rubocop/cop/style/for.rb +11 -15
- data/lib/rubocop/cop/style/format_string.rb +21 -19
- data/lib/rubocop/cop/style/format_string_token.rb +5 -7
- data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +19 -41
- data/lib/rubocop/cop/style/global_std_stream.rb +65 -0
- data/lib/rubocop/cop/style/global_vars.rb +2 -2
- data/lib/rubocop/cop/style/guard_clause.rb +5 -6
- data/lib/rubocop/cop/style/hash_as_last_array_item.rb +8 -1
- data/lib/rubocop/cop/style/hash_each_methods.rb +5 -8
- data/lib/rubocop/cop/style/hash_syntax.rb +4 -3
- data/lib/rubocop/cop/style/hash_transform_keys.rb +3 -2
- data/lib/rubocop/cop/style/hash_transform_values.rb +2 -1
- data/lib/rubocop/cop/style/identical_conditional_branches.rb +2 -2
- data/lib/rubocop/cop/style/if_inside_else.rb +3 -3
- data/lib/rubocop/cop/style/if_unless_modifier.rb +10 -32
- data/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +3 -7
- data/lib/rubocop/cop/style/if_with_semicolon.rb +3 -6
- data/lib/rubocop/cop/style/implicit_runtime_error.rb +1 -1
- data/lib/rubocop/cop/style/infinite_loop.rb +24 -24
- data/lib/rubocop/cop/style/inline_comment.rb +3 -3
- data/lib/rubocop/cop/style/inverse_methods.rb +22 -32
- data/lib/rubocop/cop/style/lambda.rb +7 -12
- data/lib/rubocop/cop/style/lambda_call.rb +14 -13
- data/lib/rubocop/cop/style/line_end_concatenation.rb +19 -16
- data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +2 -1
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +16 -11
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +4 -8
- data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +8 -7
- data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +2 -2
- data/lib/rubocop/cop/style/method_def_parentheses.rb +11 -16
- data/lib/rubocop/cop/style/min_max.rb +8 -12
- data/lib/rubocop/cop/style/missing_else.rb +13 -13
- data/lib/rubocop/cop/style/missing_respond_to_missing.rb +10 -3
- data/lib/rubocop/cop/style/mixin_grouping.rb +24 -27
- data/lib/rubocop/cop/style/mixin_usage.rb +1 -1
- data/lib/rubocop/cop/style/module_function.rb +10 -13
- data/lib/rubocop/cop/style/multiline_if_modifier.rb +3 -10
- data/lib/rubocop/cop/style/multiline_if_then.rb +4 -10
- data/lib/rubocop/cop/style/multiline_memoization.rb +14 -12
- data/lib/rubocop/cop/style/multiline_method_signature.rb +2 -2
- data/lib/rubocop/cop/style/multiline_ternary_operator.rb +4 -6
- data/lib/rubocop/cop/style/multiline_when_then.rb +7 -9
- data/lib/rubocop/cop/style/multiple_comparison.rb +1 -1
- data/lib/rubocop/cop/style/mutable_constant.rb +23 -20
- data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +3 -1
- data/lib/rubocop/cop/style/numeric_predicate.rb +4 -0
- data/lib/rubocop/cop/style/optional_boolean_parameter.rb +42 -0
- data/lib/rubocop/cop/style/parallel_assignment.rb +2 -2
- data/lib/rubocop/cop/style/percent_literal_delimiters.rb +2 -2
- data/lib/rubocop/cop/style/random_with_offset.rb +1 -0
- data/lib/rubocop/cop/style/redundant_condition.rb +15 -3
- data/lib/rubocop/cop/style/redundant_exception.rb +4 -0
- data/lib/rubocop/cop/style/redundant_regexp_escape.rb +9 -9
- data/lib/rubocop/cop/style/redundant_sort.rb +23 -10
- data/lib/rubocop/cop/style/safe_navigation.rb +4 -4
- data/lib/rubocop/cop/style/signal_exception.rb +2 -0
- data/lib/rubocop/cop/style/single_argument_dig.rb +54 -0
- data/lib/rubocop/cop/style/single_line_methods.rb +1 -1
- data/lib/rubocop/cop/style/string_concatenation.rb +92 -0
- data/lib/rubocop/cop/style/struct_inheritance.rb +1 -1
- data/lib/rubocop/cop/style/symbol_array.rb +1 -1
- data/lib/rubocop/cop/style/symbol_proc.rb +1 -1
- data/lib/rubocop/cop/style/trailing_method_end_statement.rb +1 -1
- data/lib/rubocop/cop/style/zero_length_predicate.rb +10 -6
- data/lib/rubocop/cop/team.rb +1 -1
- data/lib/rubocop/cop/tokens_util.rb +84 -0
- data/lib/rubocop/cop/util.rb +3 -13
- data/lib/rubocop/cop/variable_force.rb +0 -2
- data/lib/rubocop/cop/variable_force/branch.rb +1 -0
- data/lib/rubocop/cop/variable_force/variable.rb +2 -2
- data/lib/rubocop/cops_documentation_generator.rb +282 -0
- data/lib/rubocop/error.rb +1 -0
- data/lib/rubocop/formatter/disabled_config_formatter.rb +1 -1
- data/lib/rubocop/formatter/formatter_set.rb +1 -0
- data/lib/rubocop/formatter/junit_formatter.rb +1 -1
- data/lib/rubocop/options.rb +3 -3
- data/lib/rubocop/path_util.rb +19 -4
- data/lib/rubocop/rake_task.rb +1 -0
- data/lib/rubocop/rspec/expect_offense.rb +1 -1
- data/lib/rubocop/rspec/shared_contexts.rb +1 -5
- data/lib/rubocop/runner.rb +1 -1
- data/lib/rubocop/target_finder.rb +12 -9
- data/lib/rubocop/version.rb +2 -2
- metadata +21 -8
- data/lib/rubocop/cop/lint/useless_comparison.rb +0 -28
- data/lib/rubocop/cop/mixin/parser_diagnostic.rb +0 -37
- data/lib/rubocop/cop/mixin/too_many_lines.rb +0 -25
- data/lib/rubocop/cop/style/method_missing_super.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3201b273ee3a04b13a9f41d768d230a5be311881c7fd0b39f24aa0d99a8a16ad
|
4
|
+
data.tar.gz: 794ba4bfcadcee6a8a9aae92f88c167dc1f75122e69f4bee08baa8f22976c1bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2ea28c0fbfaa2f37ef651b91f38e3084fda1d8c829ebc1aaa839c793f0b759deb692bc70482d863797ab33799af9e083ab7f274f4faa905b956b4b53fbab96b
|
7
|
+
data.tar.gz: 2ac4b6b2e1852c4ca1df725c6de4f6d34442633cb7dea00f27499ebae6e24ad006110dd0b473c781961d6e44819039a5e5748ac0de6ec0a1b2cbceb950c3fcf2
|
data/README.md
CHANGED
@@ -49,7 +49,7 @@ haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
|
|
49
49
|
might want to use a conservative version lock in your `Gemfile`:
|
50
50
|
|
51
51
|
```rb
|
52
|
-
gem 'rubocop', '~> 0.
|
52
|
+
gem 'rubocop', '~> 0.89.1', require: false
|
53
53
|
```
|
54
54
|
|
55
55
|
## Quickstart
|
data/bin/rubocop-profile
CHANGED
data/config/default.yml
CHANGED
@@ -210,9 +210,10 @@ Gemspec/OrderedDependencies:
|
|
210
210
|
- '**/*.gemspec'
|
211
211
|
|
212
212
|
Gemspec/RequiredRubyVersion:
|
213
|
-
Description: 'Checks that `required_ruby_version` of gemspec and `TargetRubyVersion` of .rubocop.yml
|
213
|
+
Description: 'Checks that `required_ruby_version` of gemspec is specified and equal to `TargetRubyVersion` of .rubocop.yml.'
|
214
214
|
Enabled: true
|
215
215
|
VersionAdded: '0.52'
|
216
|
+
VersionChanged: '0.89'
|
216
217
|
Include:
|
217
218
|
- '**/*.gemspec'
|
218
219
|
|
@@ -1234,7 +1235,7 @@ Layout/SpaceInsideBlockBraces:
|
|
1234
1235
|
|
1235
1236
|
Layout/SpaceInsideHashLiteralBraces:
|
1236
1237
|
Description: "Use spaces inside hash literal braces - or don't."
|
1237
|
-
StyleGuide: '#spaces-
|
1238
|
+
StyleGuide: '#spaces-braces'
|
1238
1239
|
Enabled: true
|
1239
1240
|
VersionAdded: '0.49'
|
1240
1241
|
EnforcedStyle: space
|
@@ -1355,6 +1356,12 @@ Lint/BigDecimalNew:
|
|
1355
1356
|
Enabled: true
|
1356
1357
|
VersionAdded: '0.53'
|
1357
1358
|
|
1359
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
1360
|
+
Description: 'This cop checks for places where binary operator has identical operands.'
|
1361
|
+
Enabled: pending
|
1362
|
+
Safe: false
|
1363
|
+
VersionAdded: '0.89'
|
1364
|
+
|
1358
1365
|
Lint/BooleanSymbol:
|
1359
1366
|
Description: 'Check for `:true` and `:false` symbols.'
|
1360
1367
|
Enabled: true
|
@@ -1420,6 +1427,11 @@ Lint/DuplicateMethods:
|
|
1420
1427
|
Enabled: true
|
1421
1428
|
VersionAdded: '0.29'
|
1422
1429
|
|
1430
|
+
Lint/DuplicateRescueException:
|
1431
|
+
Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.'
|
1432
|
+
Enabled: pending
|
1433
|
+
VersionAdded: '0.89'
|
1434
|
+
|
1423
1435
|
Lint/EachWithObjectArgument:
|
1424
1436
|
Description: 'Check for immutable argument given to each_with_object.'
|
1425
1437
|
Enabled: true
|
@@ -1430,6 +1442,12 @@ Lint/ElseLayout:
|
|
1430
1442
|
Enabled: true
|
1431
1443
|
VersionAdded: '0.17'
|
1432
1444
|
|
1445
|
+
Lint/EmptyConditionalBody:
|
1446
|
+
Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.'
|
1447
|
+
Enabled: 'pending'
|
1448
|
+
AllowComments: true
|
1449
|
+
VersionAdded: '0.89'
|
1450
|
+
|
1433
1451
|
Lint/EmptyEnsure:
|
1434
1452
|
Description: 'Checks for empty ensure block.'
|
1435
1453
|
Enabled: true
|
@@ -1473,6 +1491,12 @@ Lint/FlipFlop:
|
|
1473
1491
|
Enabled: true
|
1474
1492
|
VersionAdded: '0.16'
|
1475
1493
|
|
1494
|
+
Lint/FloatComparison:
|
1495
|
+
Description: 'Checks for the presence of precise comparison of floating point numbers.'
|
1496
|
+
StyleGuide: '#float-comparison'
|
1497
|
+
Enabled: pending
|
1498
|
+
VersionAdded: '0.89'
|
1499
|
+
|
1476
1500
|
Lint/FloatOutOfRange:
|
1477
1501
|
Description: >-
|
1478
1502
|
Catches floating-point literals too large or small for Ruby to
|
@@ -1520,7 +1544,7 @@ Lint/InheritException:
|
|
1520
1544
|
Lint/InterpolationCheck:
|
1521
1545
|
Description: 'Raise warning for interpolation in single q strs.'
|
1522
1546
|
Enabled: true
|
1523
|
-
|
1547
|
+
Safe: false
|
1524
1548
|
VersionAdded: '0.50'
|
1525
1549
|
VersionChanged: '0.87'
|
1526
1550
|
|
@@ -1542,6 +1566,7 @@ Lint/Loop:
|
|
1542
1566
|
StyleGuide: '#loop-with-break'
|
1543
1567
|
Enabled: true
|
1544
1568
|
VersionAdded: '0.9'
|
1569
|
+
VersionChanged: '0.89'
|
1545
1570
|
|
1546
1571
|
Lint/MissingCopEnableDirective:
|
1547
1572
|
Description: 'Checks for a `# rubocop:enable` after `# rubocop:disable`.'
|
@@ -1556,6 +1581,13 @@ Lint/MissingCopEnableDirective:
|
|
1556
1581
|
# .inf for any size
|
1557
1582
|
MaximumRangeSize: .inf
|
1558
1583
|
|
1584
|
+
Lint/MissingSuper:
|
1585
|
+
Description: >-
|
1586
|
+
This cop checks for the presence of constructors and lifecycle callbacks
|
1587
|
+
without calls to `super`'.
|
1588
|
+
Enabled: pending
|
1589
|
+
VersionAdded: '0.89'
|
1590
|
+
|
1559
1591
|
Lint/MixedRegexpCaptureTypes:
|
1560
1592
|
Description: 'Do not mix named captures and numbered captures in a Regexp literal.'
|
1561
1593
|
Enabled: pending
|
@@ -1608,6 +1640,12 @@ Lint/OrderedMagicComments:
|
|
1608
1640
|
Enabled: true
|
1609
1641
|
VersionAdded: '0.53'
|
1610
1642
|
|
1643
|
+
Lint/OutOfRangeRegexpRef:
|
1644
|
+
Description: 'Checks for out of range reference for Regexp because it always returns nil.'
|
1645
|
+
Enabled: pending
|
1646
|
+
Safe: false
|
1647
|
+
VersionAdded: '0.89'
|
1648
|
+
|
1611
1649
|
Lint/ParenthesesAsGroupedExpression:
|
1612
1650
|
Description: >-
|
1613
1651
|
Checks for method calls with a space before the opening
|
@@ -1758,6 +1796,11 @@ Lint/ScriptPermission:
|
|
1758
1796
|
VersionAdded: '0.49'
|
1759
1797
|
VersionChanged: '0.50'
|
1760
1798
|
|
1799
|
+
Lint/SelfAssignment:
|
1800
|
+
Description: 'Checks for self-assignments.'
|
1801
|
+
Enabled: pending
|
1802
|
+
VersionAdded: '0.89'
|
1803
|
+
|
1761
1804
|
Lint/SendWithMixinArgument:
|
1762
1805
|
Description: 'Checks for `send` method when using mixin.'
|
1763
1806
|
Enabled: true
|
@@ -1808,6 +1851,11 @@ Lint/ToJSON:
|
|
1808
1851
|
Enabled: true
|
1809
1852
|
VersionAdded: '0.66'
|
1810
1853
|
|
1854
|
+
Lint/TopLevelReturnWithArgument:
|
1855
|
+
Description: 'This cop detects top level return statements with argument.'
|
1856
|
+
Enabled: 'pending'
|
1857
|
+
VersionAdded: '0.89'
|
1858
|
+
|
1811
1859
|
Lint/UnderscorePrefixedVariableName:
|
1812
1860
|
Description: 'Do not use prefix `_` for a variable that is used.'
|
1813
1861
|
Enabled: true
|
@@ -1824,6 +1872,11 @@ Lint/UnreachableCode:
|
|
1824
1872
|
Enabled: true
|
1825
1873
|
VersionAdded: '0.9'
|
1826
1874
|
|
1875
|
+
Lint/UnreachableLoop:
|
1876
|
+
Description: 'This cop checks for loops that will have at most one iteration.'
|
1877
|
+
Enabled: pending
|
1878
|
+
VersionAdded: '0.89'
|
1879
|
+
|
1827
1880
|
Lint/UnusedBlockArgument:
|
1828
1881
|
Description: 'Checks for unused block arguments.'
|
1829
1882
|
StyleGuide: '#underscore-unused-vars'
|
@@ -1873,11 +1926,6 @@ Lint/UselessAssignment:
|
|
1873
1926
|
Enabled: true
|
1874
1927
|
VersionAdded: '0.11'
|
1875
1928
|
|
1876
|
-
Lint/UselessComparison:
|
1877
|
-
Description: 'Checks for comparison of something with itself.'
|
1878
|
-
Enabled: true
|
1879
|
-
VersionAdded: '0.11'
|
1880
|
-
|
1881
1929
|
Lint/UselessElseWithoutRescue:
|
1882
1930
|
Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
|
1883
1931
|
Enabled: true
|
@@ -1911,7 +1959,7 @@ Metrics/AbcSize:
|
|
1911
1959
|
# The ABC size is a calculated magnitude, so this number can be an Integer or
|
1912
1960
|
# a Float.
|
1913
1961
|
IgnoredMethods: []
|
1914
|
-
Max:
|
1962
|
+
Max: 17
|
1915
1963
|
|
1916
1964
|
Metrics/BlockLength:
|
1917
1965
|
Description: 'Avoid long blocks with many lines.'
|
@@ -1993,7 +2041,7 @@ Metrics/PerceivedComplexity:
|
|
1993
2041
|
VersionAdded: '0.25'
|
1994
2042
|
VersionChanged: '0.81'
|
1995
2043
|
IgnoredMethods: []
|
1996
|
-
Max:
|
2044
|
+
Max: 8
|
1997
2045
|
|
1998
2046
|
################## Migration #############################
|
1999
2047
|
|
@@ -2352,6 +2400,7 @@ Style/ArrayCoercion:
|
|
2352
2400
|
Use Array() instead of explicit Array check or [*var], when dealing
|
2353
2401
|
with a variable you want to treat as an Array, but you're not certain it's an array.
|
2354
2402
|
StyleGuide: '#array-coercion'
|
2403
|
+
Safe: false
|
2355
2404
|
Enabled: 'pending'
|
2356
2405
|
VersionAdded: '0.88'
|
2357
2406
|
|
@@ -2527,6 +2576,7 @@ Style/CaseEquality:
|
|
2527
2576
|
StyleGuide: '#no-case-equality'
|
2528
2577
|
Enabled: true
|
2529
2578
|
VersionAdded: '0.9'
|
2579
|
+
VersionChanged: '0.89'
|
2530
2580
|
# If AllowOnConstant is enabled, the cop will ignore violations when the receiver of
|
2531
2581
|
# the case equality operator is a constant.
|
2532
2582
|
#
|
@@ -2880,6 +2930,16 @@ Style/ExpandPathArguments:
|
|
2880
2930
|
Enabled: true
|
2881
2931
|
VersionAdded: '0.53'
|
2882
2932
|
|
2933
|
+
Style/ExplicitBlockArgument:
|
2934
|
+
Description: >-
|
2935
|
+
Consider using explicit block argument to avoid writing block literal
|
2936
|
+
that just passes its arguments to another block.
|
2937
|
+
StyleGuide: '#block-argument'
|
2938
|
+
Enabled: pending
|
2939
|
+
# May change the yielding arity.
|
2940
|
+
Safe: false
|
2941
|
+
VersionAdded: '0.89'
|
2942
|
+
|
2883
2943
|
Style/ExponentialNotation:
|
2884
2944
|
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
|
2885
2945
|
StyleGuide: '#exponential-notation'
|
@@ -2963,6 +3023,12 @@ Style/FrozenStringLiteralComment:
|
|
2963
3023
|
- never
|
2964
3024
|
Safe: false
|
2965
3025
|
|
3026
|
+
Style/GlobalStdStream:
|
3027
|
+
Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.'
|
3028
|
+
StyleGuide: '#global-stdout'
|
3029
|
+
Enabled: pending
|
3030
|
+
VersionAdded: '0.89'
|
3031
|
+
|
2966
3032
|
Style/GlobalVars:
|
2967
3033
|
Description: 'Do not introduce global variables.'
|
2968
3034
|
StyleGuide: '#instance-vars'
|
@@ -3218,12 +3284,6 @@ Style/MethodDefParentheses:
|
|
3218
3284
|
- require_no_parentheses
|
3219
3285
|
- require_no_parentheses_except_multiline
|
3220
3286
|
|
3221
|
-
Style/MethodMissingSuper:
|
3222
|
-
Description: Checks for `method_missing` to call `super`.
|
3223
|
-
StyleGuide: '#no-method-missing'
|
3224
|
-
Enabled: true
|
3225
|
-
VersionAdded: '0.56'
|
3226
|
-
|
3227
3287
|
Style/MinMax:
|
3228
3288
|
Description: >-
|
3229
3289
|
Use `Enumerable#minmax` instead of `Enumerable#min`
|
@@ -3565,6 +3625,13 @@ Style/OptionalArguments:
|
|
3565
3625
|
VersionAdded: '0.33'
|
3566
3626
|
VersionChanged: '0.83'
|
3567
3627
|
|
3628
|
+
Style/OptionalBooleanParameter:
|
3629
|
+
Description: 'Use keyword arguments when defining method with boolean argument.'
|
3630
|
+
StyleGuide: '#boolean-keyword-arguments'
|
3631
|
+
Enabled: pending
|
3632
|
+
Safe: false
|
3633
|
+
VersionAdded: '0.89'
|
3634
|
+
|
3568
3635
|
Style/OrAssignment:
|
3569
3636
|
Description: 'Recommend usage of double pipe equals (||=) where applicable.'
|
3570
3637
|
StyleGuide: '#double-pipe-for-uninit'
|
@@ -3883,6 +3950,12 @@ Style/SignalException:
|
|
3883
3950
|
- only_fail
|
3884
3951
|
- semantic
|
3885
3952
|
|
3953
|
+
Style/SingleArgumentDig:
|
3954
|
+
Description: 'Avoid using single argument dig method.'
|
3955
|
+
Enabled: pending
|
3956
|
+
VersionAdded: '0.89'
|
3957
|
+
Safe: false
|
3958
|
+
|
3886
3959
|
Style/SingleLineBlockParams:
|
3887
3960
|
Description: 'Enforces the names of some block params.'
|
3888
3961
|
Enabled: false
|
@@ -3938,6 +4011,13 @@ Style/StderrPuts:
|
|
3938
4011
|
Enabled: true
|
3939
4012
|
VersionAdded: '0.51'
|
3940
4013
|
|
4014
|
+
Style/StringConcatenation:
|
4015
|
+
Description: 'Checks for places where string concatenation can be replaced with string interpolation.'
|
4016
|
+
StyleGuide: '#string-interpolation'
|
4017
|
+
Enabled: pending
|
4018
|
+
Safe: false
|
4019
|
+
VersionAdded: '0.89'
|
4020
|
+
|
3941
4021
|
Style/StringHashKeys:
|
3942
4022
|
Description: 'Prefer symbols instead of strings as hash keys.'
|
3943
4023
|
StyleGuide: '#symbols-as-keys'
|
data/lib/rubocop.rb
CHANGED
@@ -23,6 +23,7 @@ require_relative 'rubocop/string_interpreter'
|
|
23
23
|
require_relative 'rubocop/error'
|
24
24
|
require_relative 'rubocop/warning'
|
25
25
|
|
26
|
+
require_relative 'rubocop/cop/tokens_util'
|
26
27
|
require_relative 'rubocop/cop/util'
|
27
28
|
require_relative 'rubocop/cop/offense'
|
28
29
|
require_relative 'rubocop/cop/message_annotator'
|
@@ -81,6 +82,7 @@ require_relative 'rubocop/cop/mixin/integer_node'
|
|
81
82
|
require_relative 'rubocop/cop/mixin/interpolation'
|
82
83
|
require_relative 'rubocop/cop/mixin/line_length_help'
|
83
84
|
require_relative 'rubocop/cop/mixin/match_range'
|
85
|
+
require_relative 'rubocop/cop/metrics/utils/repeated_csend_discount'
|
84
86
|
require_relative 'rubocop/cop/mixin/method_complexity'
|
85
87
|
require_relative 'rubocop/cop/mixin/method_preference'
|
86
88
|
require_relative 'rubocop/cop/mixin/min_body_length'
|
@@ -94,7 +96,6 @@ require_relative 'rubocop/cop/mixin/nil_methods'
|
|
94
96
|
require_relative 'rubocop/cop/mixin/on_normal_if_unless'
|
95
97
|
require_relative 'rubocop/cop/mixin/ordered_gem_node'
|
96
98
|
require_relative 'rubocop/cop/mixin/parentheses'
|
97
|
-
require_relative 'rubocop/cop/mixin/parser_diagnostic'
|
98
99
|
require_relative 'rubocop/cop/mixin/percent_array'
|
99
100
|
require_relative 'rubocop/cop/mixin/percent_literal'
|
100
101
|
require_relative 'rubocop/cop/mixin/preceding_following_alignment'
|
@@ -110,7 +111,6 @@ require_relative 'rubocop/cop/mixin/statement_modifier'
|
|
110
111
|
require_relative 'rubocop/cop/mixin/string_help'
|
111
112
|
require_relative 'rubocop/cop/mixin/string_literals_help'
|
112
113
|
require_relative 'rubocop/cop/mixin/target_ruby_version'
|
113
|
-
require_relative 'rubocop/cop/mixin/too_many_lines'
|
114
114
|
require_relative 'rubocop/cop/mixin/trailing_body'
|
115
115
|
require_relative 'rubocop/cop/mixin/trailing_comma'
|
116
116
|
require_relative 'rubocop/cop/mixin/uncommunicative_name'
|
@@ -243,6 +243,7 @@ require_relative 'rubocop/cop/lint/ambiguous_operator'
|
|
243
243
|
require_relative 'rubocop/cop/lint/ambiguous_regexp_literal'
|
244
244
|
require_relative 'rubocop/cop/lint/assignment_in_condition'
|
245
245
|
require_relative 'rubocop/cop/lint/big_decimal_new'
|
246
|
+
require_relative 'rubocop/cop/lint/binary_operator_with_identical_operands'
|
246
247
|
require_relative 'rubocop/cop/lint/boolean_symbol'
|
247
248
|
require_relative 'rubocop/cop/lint/circular_argument_reference'
|
248
249
|
require_relative 'rubocop/cop/lint/constant_resolution'
|
@@ -254,8 +255,10 @@ require_relative 'rubocop/cop/lint/duplicate_case_condition'
|
|
254
255
|
require_relative 'rubocop/cop/lint/duplicate_elsif_condition'
|
255
256
|
require_relative 'rubocop/cop/lint/duplicate_hash_key'
|
256
257
|
require_relative 'rubocop/cop/lint/duplicate_methods'
|
258
|
+
require_relative 'rubocop/cop/lint/duplicate_rescue_exception'
|
257
259
|
require_relative 'rubocop/cop/lint/each_with_object_argument'
|
258
260
|
require_relative 'rubocop/cop/lint/else_layout'
|
261
|
+
require_relative 'rubocop/cop/lint/empty_conditional_body'
|
259
262
|
require_relative 'rubocop/cop/lint/empty_ensure'
|
260
263
|
require_relative 'rubocop/cop/lint/empty_expression'
|
261
264
|
require_relative 'rubocop/cop/lint/empty_interpolation'
|
@@ -263,6 +266,7 @@ require_relative 'rubocop/cop/lint/empty_when'
|
|
263
266
|
require_relative 'rubocop/cop/lint/ensure_return'
|
264
267
|
require_relative 'rubocop/cop/lint/erb_new_arguments'
|
265
268
|
require_relative 'rubocop/cop/lint/flip_flop'
|
269
|
+
require_relative 'rubocop/cop/lint/float_comparison'
|
266
270
|
require_relative 'rubocop/cop/lint/float_out_of_range'
|
267
271
|
require_relative 'rubocop/cop/lint/format_parameter_mismatch'
|
268
272
|
require_relative 'rubocop/cop/lint/heredoc_method_call_position'
|
@@ -274,6 +278,7 @@ require_relative 'rubocop/cop/lint/literal_as_condition'
|
|
274
278
|
require_relative 'rubocop/cop/lint/literal_in_interpolation'
|
275
279
|
require_relative 'rubocop/cop/lint/loop'
|
276
280
|
require_relative 'rubocop/cop/lint/missing_cop_enable_directive'
|
281
|
+
require_relative 'rubocop/cop/lint/missing_super'
|
277
282
|
require_relative 'rubocop/cop/lint/mixed_regexp_capture_types'
|
278
283
|
require_relative 'rubocop/cop/lint/multiple_comparison'
|
279
284
|
require_relative 'rubocop/cop/lint/nested_method_definition'
|
@@ -283,6 +288,7 @@ require_relative 'rubocop/cop/lint/non_deterministic_require_order'
|
|
283
288
|
require_relative 'rubocop/cop/lint/non_local_exit_from_iterator'
|
284
289
|
require_relative 'rubocop/cop/lint/number_conversion'
|
285
290
|
require_relative 'rubocop/cop/lint/ordered_magic_comments'
|
291
|
+
require_relative 'rubocop/cop/lint/out_of_range_regexp_ref'
|
286
292
|
require_relative 'rubocop/cop/lint/parentheses_as_grouped_expression'
|
287
293
|
require_relative 'rubocop/cop/lint/percent_string_array'
|
288
294
|
require_relative 'rubocop/cop/lint/percent_symbol_array'
|
@@ -304,6 +310,7 @@ require_relative 'rubocop/cop/lint/safe_navigation_consistency'
|
|
304
310
|
require_relative 'rubocop/cop/lint/safe_navigation_chain'
|
305
311
|
require_relative 'rubocop/cop/lint/safe_navigation_with_empty'
|
306
312
|
require_relative 'rubocop/cop/lint/script_permission'
|
313
|
+
require_relative 'rubocop/cop/lint/self_assignment'
|
307
314
|
require_relative 'rubocop/cop/lint/send_with_mixin_argument'
|
308
315
|
require_relative 'rubocop/cop/lint/shadowed_argument'
|
309
316
|
require_relative 'rubocop/cop/lint/shadowed_exception'
|
@@ -312,16 +319,17 @@ require_relative 'rubocop/cop/lint/struct_new_override'
|
|
312
319
|
require_relative 'rubocop/cop/lint/suppressed_exception'
|
313
320
|
require_relative 'rubocop/cop/lint/syntax'
|
314
321
|
require_relative 'rubocop/cop/lint/to_json'
|
322
|
+
require_relative 'rubocop/cop/lint/top_level_return_with_argument'
|
315
323
|
require_relative 'rubocop/cop/lint/underscore_prefixed_variable_name'
|
316
324
|
require_relative 'rubocop/cop/lint/unified_integer'
|
317
325
|
require_relative 'rubocop/cop/lint/unreachable_code'
|
326
|
+
require_relative 'rubocop/cop/lint/unreachable_loop'
|
318
327
|
require_relative 'rubocop/cop/lint/unused_block_argument'
|
319
328
|
require_relative 'rubocop/cop/lint/unused_method_argument'
|
320
329
|
require_relative 'rubocop/cop/lint/uri_escape_unescape'
|
321
330
|
require_relative 'rubocop/cop/lint/uri_regexp'
|
322
331
|
require_relative 'rubocop/cop/lint/useless_access_modifier'
|
323
332
|
require_relative 'rubocop/cop/lint/useless_assignment'
|
324
|
-
require_relative 'rubocop/cop/lint/useless_comparison'
|
325
333
|
require_relative 'rubocop/cop/lint/useless_else_without_rescue'
|
326
334
|
require_relative 'rubocop/cop/lint/useless_setter_call'
|
327
335
|
require_relative 'rubocop/cop/lint/void'
|
@@ -408,12 +416,14 @@ require_relative 'rubocop/cop/style/end_block'
|
|
408
416
|
require_relative 'rubocop/cop/style/eval_with_location'
|
409
417
|
require_relative 'rubocop/cop/style/even_odd'
|
410
418
|
require_relative 'rubocop/cop/style/expand_path_arguments'
|
419
|
+
require_relative 'rubocop/cop/style/explicit_block_argument'
|
411
420
|
require_relative 'rubocop/cop/style/exponential_notation'
|
412
421
|
require_relative 'rubocop/cop/style/float_division'
|
413
422
|
require_relative 'rubocop/cop/style/for'
|
414
423
|
require_relative 'rubocop/cop/style/format_string'
|
415
424
|
require_relative 'rubocop/cop/style/format_string_token'
|
416
425
|
require_relative 'rubocop/cop/style/frozen_string_literal_comment'
|
426
|
+
require_relative 'rubocop/cop/style/global_std_stream'
|
417
427
|
require_relative 'rubocop/cop/style/global_vars'
|
418
428
|
require_relative 'rubocop/cop/style/guard_clause'
|
419
429
|
require_relative 'rubocop/cop/style/hash_as_last_array_item'
|
@@ -444,7 +454,6 @@ require_relative 'rubocop/cop/style/method_call_with_args_parentheses/omit_paren
|
|
444
454
|
require_relative 'rubocop/cop/style/method_call_with_args_parentheses/require_parentheses'
|
445
455
|
require_relative 'rubocop/cop/style/method_called_on_do_end_block'
|
446
456
|
require_relative 'rubocop/cop/style/method_def_parentheses'
|
447
|
-
require_relative 'rubocop/cop/style/method_missing_super'
|
448
457
|
require_relative 'rubocop/cop/style/min_max'
|
449
458
|
require_relative 'rubocop/cop/style/missing_else'
|
450
459
|
require_relative 'rubocop/cop/style/missing_respond_to_missing'
|
@@ -477,6 +486,7 @@ require_relative 'rubocop/cop/style/one_line_conditional'
|
|
477
486
|
require_relative 'rubocop/cop/style/or_assignment'
|
478
487
|
require_relative 'rubocop/cop/style/option_hash'
|
479
488
|
require_relative 'rubocop/cop/style/optional_arguments'
|
489
|
+
require_relative 'rubocop/cop/style/optional_boolean_parameter'
|
480
490
|
require_relative 'rubocop/cop/style/parallel_assignment'
|
481
491
|
require_relative 'rubocop/cop/style/parentheses_around_condition'
|
482
492
|
require_relative 'rubocop/cop/style/percent_literal_delimiters'
|
@@ -511,12 +521,14 @@ require_relative 'rubocop/cop/style/self_assignment'
|
|
511
521
|
require_relative 'rubocop/cop/style/semicolon'
|
512
522
|
require_relative 'rubocop/cop/style/send'
|
513
523
|
require_relative 'rubocop/cop/style/signal_exception'
|
524
|
+
require_relative 'rubocop/cop/style/single_argument_dig'
|
514
525
|
require_relative 'rubocop/cop/style/single_line_block_params'
|
515
526
|
require_relative 'rubocop/cop/style/single_line_methods'
|
516
527
|
require_relative 'rubocop/cop/style/slicing_with_range'
|
517
528
|
require_relative 'rubocop/cop/style/special_global_vars'
|
518
529
|
require_relative 'rubocop/cop/style/stabby_lambda_parentheses'
|
519
530
|
require_relative 'rubocop/cop/style/stderr_puts'
|
531
|
+
require_relative 'rubocop/cop/style/string_concatenation'
|
520
532
|
require_relative 'rubocop/cop/style/string_hash_keys'
|
521
533
|
require_relative 'rubocop/cop/style/string_literals'
|
522
534
|
require_relative 'rubocop/cop/style/string_literals_in_interpolation'
|
@@ -113,7 +113,7 @@ module RuboCop
|
|
113
113
|
return if files.include?(AUTO_GENERATED_FILE)
|
114
114
|
|
115
115
|
files.unshift(AUTO_GENERATED_FILE)
|
116
|
-
file_string = "\n -
|
116
|
+
file_string = "\n - #{files.join("\n - ")}" if files.size > 1
|
117
117
|
rubocop_yml_contents = existing_configuration(config_file)
|
118
118
|
end
|
119
119
|
|