rubocop 1.66.1 → 1.69.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/config/default.yml +96 -12
- data/config/internal_affairs.yml +11 -0
- data/lib/rubocop/cached_data.rb +12 -4
- data/lib/rubocop/cli/command/auto_generate_config.rb +6 -7
- data/lib/rubocop/cli/command/execute_runner.rb +1 -1
- data/lib/rubocop/cli/command/lsp.rb +2 -2
- data/lib/rubocop/cli/command/version.rb +2 -2
- data/lib/rubocop/config_loader_resolver.rb +3 -3
- data/lib/rubocop/config_validator.rb +2 -1
- data/lib/rubocop/cop/autocorrect_logic.rb +22 -2
- data/lib/rubocop/cop/base.rb +7 -3
- data/lib/rubocop/cop/bundler/gem_filename.rb +0 -1
- data/lib/rubocop/cop/bundler/gem_version.rb +1 -0
- data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +0 -1
- data/lib/rubocop/cop/cop.rb +8 -0
- data/lib/rubocop/cop/correctors/alignment_corrector.rb +1 -12
- data/lib/rubocop/cop/correctors/for_to_each_corrector.rb +1 -1
- data/lib/rubocop/cop/correctors/parentheses_corrector.rb +1 -1
- data/lib/rubocop/cop/correctors/percent_literal_corrector.rb +10 -0
- data/lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb +1 -2
- data/lib/rubocop/cop/gemspec/required_ruby_version.rb +0 -2
- data/lib/rubocop/cop/generator.rb +6 -0
- data/lib/rubocop/cop/internal_affairs/cop_description.rb +0 -4
- data/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb +3 -4
- data/lib/rubocop/cop/internal_affairs/numblock_handler.rb +1 -1
- data/lib/rubocop/cop/internal_affairs/operator_keyword.rb +46 -0
- data/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +6 -21
- data/lib/rubocop/cop/internal_affairs/redundant_source_range.rb +8 -1
- data/lib/rubocop/cop/internal_affairs/style_detected_api_use.rb +0 -2
- data/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +0 -5
- data/lib/rubocop/cop/internal_affairs.rb +17 -0
- data/lib/rubocop/cop/layout/access_modifier_indentation.rb +5 -1
- data/lib/rubocop/cop/layout/argument_alignment.rb +1 -2
- data/lib/rubocop/cop/layout/array_alignment.rb +1 -1
- data/lib/rubocop/cop/layout/begin_end_alignment.rb +0 -1
- data/lib/rubocop/cop/layout/block_alignment.rb +1 -2
- data/lib/rubocop/cop/layout/def_end_alignment.rb +1 -1
- data/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +2 -2
- data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +2 -3
- data/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +3 -4
- data/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +3 -1
- data/lib/rubocop/cop/layout/first_method_argument_line_break.rb +8 -0
- data/lib/rubocop/cop/layout/indentation_width.rb +11 -12
- data/lib/rubocop/cop/layout/leading_comment_space.rb +71 -1
- data/lib/rubocop/cop/layout/line_length.rb +118 -4
- data/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +1 -1
- data/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +1 -1
- data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +2 -3
- data/lib/rubocop/cop/layout/parameter_alignment.rb +3 -4
- data/lib/rubocop/cop/layout/redundant_line_break.rb +3 -35
- data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +3 -2
- data/lib/rubocop/cop/layout/space_around_keyword.rb +1 -1
- data/lib/rubocop/cop/layout/space_around_operators.rb +16 -17
- data/lib/rubocop/cop/layout/space_before_brackets.rb +5 -5
- data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +6 -0
- data/lib/rubocop/cop/layout/space_inside_block_braces.rb +4 -0
- data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +4 -0
- data/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +0 -1
- data/lib/rubocop/cop/lint/ambiguous_range.rb +4 -1
- data/lib/rubocop/cop/lint/big_decimal_new.rb +4 -7
- data/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +10 -12
- data/lib/rubocop/cop/lint/boolean_symbol.rb +1 -1
- data/lib/rubocop/cop/lint/circular_argument_reference.rb +6 -0
- data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +2 -1
- data/lib/rubocop/cop/lint/duplicate_branch.rb +39 -4
- data/lib/rubocop/cop/lint/duplicate_set_element.rb +74 -0
- data/lib/rubocop/cop/lint/empty_ensure.rb +1 -1
- data/lib/rubocop/cop/lint/empty_file.rb +0 -2
- data/lib/rubocop/cop/lint/ensure_return.rb +1 -4
- data/lib/rubocop/cop/lint/erb_new_arguments.rb +1 -1
- data/lib/rubocop/cop/lint/float_comparison.rb +15 -7
- data/lib/rubocop/cop/lint/float_out_of_range.rb +1 -3
- data/lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb +55 -0
- data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +10 -4
- data/lib/rubocop/cop/lint/interpolation_check.rb +9 -0
- data/lib/rubocop/cop/lint/it_without_arguments_in_block.rb +8 -14
- data/lib/rubocop/cop/lint/literal_as_condition.rb +1 -0
- data/lib/rubocop/cop/lint/literal_assignment_in_condition.rb +1 -1
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +25 -2
- data/lib/rubocop/cop/lint/mixed_case_range.rb +2 -5
- data/lib/rubocop/cop/lint/nested_method_definition.rb +1 -1
- data/lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb +2 -2
- data/lib/rubocop/cop/lint/non_atomic_file_operation.rb +8 -1
- data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +3 -3
- data/lib/rubocop/cop/lint/number_conversion.rb +0 -1
- data/lib/rubocop/cop/lint/numbered_parameter_assignment.rb +1 -2
- data/lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb +106 -0
- data/lib/rubocop/cop/lint/or_assignment_to_constant.rb +1 -2
- data/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +1 -1
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +5 -6
- data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +1 -1
- data/lib/rubocop/cop/lint/redundant_safe_navigation.rb +13 -8
- data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +8 -7
- data/lib/rubocop/cop/lint/refinement_import_methods.rb +1 -1
- data/lib/rubocop/cop/lint/regexp_as_condition.rb +0 -1
- data/lib/rubocop/cop/lint/rescue_type.rb +3 -7
- data/lib/rubocop/cop/lint/safe_navigation_chain.rb +9 -0
- data/lib/rubocop/cop/lint/safe_navigation_consistency.rb +109 -41
- data/lib/rubocop/cop/lint/self_assignment.rb +8 -10
- data/lib/rubocop/cop/lint/shadowed_exception.rb +1 -1
- data/lib/rubocop/cop/lint/symbol_conversion.rb +1 -1
- data/lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +91 -0
- data/lib/rubocop/cop/lint/unreachable_code.rb +51 -2
- data/lib/rubocop/cop/lint/unused_method_argument.rb +18 -2
- data/lib/rubocop/cop/lint/uri_regexp.rb +25 -7
- data/lib/rubocop/cop/lint/useless_defined.rb +55 -0
- data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +4 -0
- data/lib/rubocop/cop/lint/useless_rescue.rb +1 -1
- data/lib/rubocop/cop/lint/useless_setter_call.rb +14 -25
- data/lib/rubocop/cop/lint/void.rb +3 -2
- data/lib/rubocop/cop/metrics/class_length.rb +7 -7
- data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +4 -1
- data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +1 -1
- data/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +2 -3
- data/lib/rubocop/cop/mixin/check_assignment.rb +4 -12
- data/lib/rubocop/cop/mixin/check_line_breakable.rb +10 -0
- data/lib/rubocop/cop/mixin/check_single_line_suitability.rb +49 -0
- data/lib/rubocop/cop/mixin/dig_help.rb +27 -0
- data/lib/rubocop/cop/mixin/endless_method_rewriter.rb +24 -0
- data/lib/rubocop/cop/mixin/frozen_string_literal.rb +3 -1
- data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +5 -9
- data/lib/rubocop/cop/mixin/percent_array.rb +1 -1
- data/lib/rubocop/cop/mixin/range_help.rb +0 -1
- data/lib/rubocop/cop/mixin/statement_modifier.rb +3 -2
- data/lib/rubocop/cop/mixin/target_ruby_version.rb +17 -1
- data/lib/rubocop/cop/naming/accessor_method_name.rb +6 -6
- data/lib/rubocop/cop/naming/block_forwarding.rb +1 -1
- data/lib/rubocop/cop/naming/constant_name.rb +6 -7
- data/lib/rubocop/cop/naming/file_name.rb +0 -2
- data/lib/rubocop/cop/naming/inclusive_language.rb +12 -3
- data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +11 -12
- data/lib/rubocop/cop/naming/predicate_name.rb +1 -1
- data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +3 -11
- data/lib/rubocop/cop/naming/variable_name.rb +3 -4
- data/lib/rubocop/cop/naming/variable_number.rb +2 -3
- data/lib/rubocop/cop/offense.rb +4 -5
- data/lib/rubocop/cop/security/compound_hash.rb +1 -0
- data/lib/rubocop/cop/security/yaml_load.rb +3 -2
- data/lib/rubocop/cop/style/access_modifier_declarations.rb +64 -25
- data/lib/rubocop/cop/style/accessor_grouping.rb +10 -2
- data/lib/rubocop/cop/style/ambiguous_endless_method_definition.rb +79 -0
- data/lib/rubocop/cop/style/arguments_forwarding.rb +46 -6
- data/lib/rubocop/cop/style/array_intersect.rb +5 -4
- data/lib/rubocop/cop/style/bitwise_predicate.rb +100 -0
- data/lib/rubocop/cop/style/block_delimiters.rb +41 -5
- data/lib/rubocop/cop/style/case_like_if.rb +8 -11
- data/lib/rubocop/cop/style/collection_compact.rb +10 -10
- data/lib/rubocop/cop/style/combinable_defined.rb +115 -0
- data/lib/rubocop/cop/style/combinable_loops.rb +7 -0
- data/lib/rubocop/cop/style/commented_keyword.rb +17 -1
- data/lib/rubocop/cop/style/conditional_assignment.rb +20 -22
- data/lib/rubocop/cop/style/constant_visibility.rb +3 -12
- data/lib/rubocop/cop/style/data_inheritance.rb +1 -1
- data/lib/rubocop/cop/style/dig_chain.rb +89 -0
- data/lib/rubocop/cop/style/endless_method.rb +1 -14
- data/lib/rubocop/cop/style/eval_with_location.rb +1 -1
- data/lib/rubocop/cop/style/fetch_env_var.rb +1 -0
- data/lib/rubocop/cop/style/file_null.rb +73 -0
- data/lib/rubocop/cop/style/file_touch.rb +75 -0
- data/lib/rubocop/cop/style/for.rb +0 -1
- data/lib/rubocop/cop/style/global_vars.rb +1 -3
- data/lib/rubocop/cop/style/guard_clause.rb +16 -3
- data/lib/rubocop/cop/style/hash_conversion.rb +1 -2
- data/lib/rubocop/cop/style/hash_each_methods.rb +6 -0
- data/lib/rubocop/cop/style/hash_except.rb +19 -7
- data/lib/rubocop/cop/style/hash_syntax.rb +2 -2
- data/lib/rubocop/cop/style/if_inside_else.rb +1 -2
- data/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +1 -2
- data/lib/rubocop/cop/style/if_with_semicolon.rb +20 -7
- data/lib/rubocop/cop/style/inverse_methods.rb +0 -1
- data/lib/rubocop/cop/style/keyword_arguments_merging.rb +67 -0
- data/lib/rubocop/cop/style/lambda.rb +1 -1
- data/lib/rubocop/cop/style/lambda_call.rb +3 -2
- data/lib/rubocop/cop/style/map_into_array.rb +59 -8
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +13 -8
- data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +7 -11
- data/lib/rubocop/cop/style/missing_respond_to_missing.rb +33 -3
- data/lib/rubocop/cop/style/multiline_memoization.rb +2 -2
- data/lib/rubocop/cop/style/multiple_comparison.rb +28 -39
- data/lib/rubocop/cop/style/mutable_constant.rb +4 -5
- data/lib/rubocop/cop/style/negated_if_else_condition.rb +6 -4
- data/lib/rubocop/cop/style/nested_modifier.rb +1 -1
- data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +1 -1
- data/lib/rubocop/cop/style/nested_ternary_operator.rb +5 -4
- data/lib/rubocop/cop/style/not.rb +1 -1
- data/lib/rubocop/cop/style/object_then.rb +1 -0
- data/lib/rubocop/cop/style/one_line_conditional.rb +29 -4
- data/lib/rubocop/cop/style/operator_method_call.rb +25 -7
- data/lib/rubocop/cop/style/or_assignment.rb +3 -6
- data/lib/rubocop/cop/style/parallel_assignment.rb +8 -13
- data/lib/rubocop/cop/style/raise_args.rb +1 -1
- data/lib/rubocop/cop/style/redundant_argument.rb +3 -1
- data/lib/rubocop/cop/style/redundant_assignment.rb +1 -1
- data/lib/rubocop/cop/style/redundant_begin.rb +4 -0
- data/lib/rubocop/cop/style/redundant_condition.rb +37 -22
- data/lib/rubocop/cop/style/redundant_line_continuation.rb +24 -5
- data/lib/rubocop/cop/style/redundant_parentheses.rb +11 -13
- data/lib/rubocop/cop/style/redundant_regexp_argument.rb +1 -0
- data/lib/rubocop/cop/style/redundant_return.rb +2 -2
- data/lib/rubocop/cop/style/redundant_self.rb +8 -15
- data/lib/rubocop/cop/style/redundant_self_assignment.rb +7 -5
- data/lib/rubocop/cop/style/redundant_self_assignment_branch.rb +4 -4
- data/lib/rubocop/cop/style/redundant_sort.rb +1 -1
- data/lib/rubocop/cop/style/require_order.rb +1 -1
- data/lib/rubocop/cop/style/rescue_modifier.rb +15 -4
- data/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb +54 -12
- data/lib/rubocop/cop/style/safe_navigation.rb +104 -50
- data/lib/rubocop/cop/style/safe_navigation_chain_length.rb +52 -0
- data/lib/rubocop/cop/style/select_by_regexp.rb +10 -7
- data/lib/rubocop/cop/style/self_assignment.rb +11 -17
- data/lib/rubocop/cop/style/semicolon.rb +1 -1
- data/lib/rubocop/cop/style/signal_exception.rb +2 -3
- data/lib/rubocop/cop/style/single_argument_dig.rb +9 -5
- data/lib/rubocop/cop/style/single_line_do_end_block.rb +13 -3
- data/lib/rubocop/cop/style/sole_nested_conditional.rb +2 -3
- data/lib/rubocop/cop/style/special_global_vars.rb +1 -1
- data/lib/rubocop/cop/style/string_concatenation.rb +13 -12
- data/lib/rubocop/cop/style/struct_inheritance.rb +1 -1
- data/lib/rubocop/cop/style/swap_values.rb +4 -15
- data/lib/rubocop/cop/style/ternary_parentheses.rb +26 -5
- data/lib/rubocop/cop/style/trailing_underscore_variable.rb +4 -4
- data/lib/rubocop/cop/style/trivial_accessors.rb +1 -1
- data/lib/rubocop/cop/style/variable_interpolation.rb +1 -2
- data/lib/rubocop/cop/team.rb +8 -1
- data/lib/rubocop/cop/util.rb +1 -1
- data/lib/rubocop/cop/variable_force/assignment.rb +18 -3
- data/lib/rubocop/cop/variable_force/branch.rb +1 -1
- data/lib/rubocop/cop/variable_force/variable.rb +5 -1
- data/lib/rubocop/cop/variable_force/variable_table.rb +2 -2
- data/lib/rubocop/cop/variable_force.rb +4 -10
- data/lib/rubocop/cops_documentation_generator.rb +90 -41
- data/lib/rubocop/file_finder.rb +9 -4
- data/lib/rubocop/formatter/disabled_config_formatter.rb +1 -1
- data/lib/rubocop/lsp/runtime.rb +2 -0
- data/lib/rubocop/lsp/server.rb +0 -1
- data/lib/rubocop/rspec/expect_offense.rb +1 -0
- data/lib/rubocop/runner.rb +17 -6
- data/lib/rubocop/server/cache.rb +6 -1
- data/lib/rubocop/server/core.rb +1 -0
- data/lib/rubocop/target_ruby.rb +13 -13
- data/lib/rubocop/version.rb +28 -7
- data/lib/rubocop/yaml_duplication_checker.rb +20 -27
- data/lib/rubocop.rb +18 -0
- metadata +32 -14
data/lib/rubocop.rb
CHANGED
@@ -11,6 +11,7 @@ require 'rainbow'
|
|
11
11
|
|
12
12
|
require 'regexp_parser'
|
13
13
|
require 'set'
|
14
|
+
require 'stringio'
|
14
15
|
require 'unicode/display_width'
|
15
16
|
|
16
17
|
# we have to require RuboCop's version, before rubocop-ast's
|
@@ -77,12 +78,14 @@ require_relative 'rubocop/cop/mixin/allowed_receivers'
|
|
77
78
|
require_relative 'rubocop/cop/mixin/auto_corrector' # rubocop:todo Naming/InclusiveLanguage
|
78
79
|
require_relative 'rubocop/cop/mixin/check_assignment'
|
79
80
|
require_relative 'rubocop/cop/mixin/check_line_breakable'
|
81
|
+
require_relative 'rubocop/cop/mixin/check_single_line_suitability'
|
80
82
|
require_relative 'rubocop/cop/mixin/configurable_max'
|
81
83
|
require_relative 'rubocop/cop/mixin/code_length' # relies on configurable_max
|
82
84
|
require_relative 'rubocop/cop/mixin/configurable_enforced_style'
|
83
85
|
require_relative 'rubocop/cop/mixin/configurable_formatting'
|
84
86
|
require_relative 'rubocop/cop/mixin/configurable_naming'
|
85
87
|
require_relative 'rubocop/cop/mixin/configurable_numbering'
|
88
|
+
require_relative 'rubocop/cop/mixin/dig_help'
|
86
89
|
require_relative 'rubocop/cop/mixin/documentation_comment'
|
87
90
|
require_relative 'rubocop/cop/mixin/duplication'
|
88
91
|
require_relative 'rubocop/cop/mixin/range_help'
|
@@ -90,6 +93,7 @@ require_relative 'rubocop/cop/mixin/annotation_comment' # relies on range
|
|
90
93
|
require_relative 'rubocop/cop/mixin/empty_lines_around_body' # relies on range
|
91
94
|
require_relative 'rubocop/cop/mixin/empty_parameter'
|
92
95
|
require_relative 'rubocop/cop/mixin/end_keyword_alignment'
|
96
|
+
require_relative 'rubocop/cop/mixin/endless_method_rewriter'
|
93
97
|
require_relative 'rubocop/cop/mixin/enforce_superclass'
|
94
98
|
require_relative 'rubocop/cop/mixin/first_element_line_break'
|
95
99
|
require_relative 'rubocop/cop/mixin/frozen_string_literal'
|
@@ -312,6 +316,7 @@ require_relative 'rubocop/cop/lint/duplicate_methods'
|
|
312
316
|
require_relative 'rubocop/cop/lint/duplicate_regexp_character_class_element'
|
313
317
|
require_relative 'rubocop/cop/lint/duplicate_require'
|
314
318
|
require_relative 'rubocop/cop/lint/duplicate_rescue_exception'
|
319
|
+
require_relative 'rubocop/cop/lint/duplicate_set_element'
|
315
320
|
require_relative 'rubocop/cop/lint/each_with_object_argument'
|
316
321
|
require_relative 'rubocop/cop/lint/else_layout'
|
317
322
|
require_relative 'rubocop/cop/lint/empty_block'
|
@@ -330,6 +335,7 @@ require_relative 'rubocop/cop/lint/float_comparison'
|
|
330
335
|
require_relative 'rubocop/cop/lint/float_out_of_range'
|
331
336
|
require_relative 'rubocop/cop/lint/format_parameter_mismatch'
|
332
337
|
require_relative 'rubocop/cop/lint/hash_compare_by_identity'
|
338
|
+
require_relative 'rubocop/cop/lint/hash_new_with_keyword_arguments_as_default'
|
333
339
|
require_relative 'rubocop/cop/lint/heredoc_method_call_position'
|
334
340
|
require_relative 'rubocop/cop/lint/identity_comparison'
|
335
341
|
require_relative 'rubocop/cop/lint/implicit_string_concatenation'
|
@@ -357,6 +363,7 @@ require_relative 'rubocop/cop/lint/non_deterministic_require_order'
|
|
357
363
|
require_relative 'rubocop/cop/lint/non_local_exit_from_iterator'
|
358
364
|
require_relative 'rubocop/cop/lint/number_conversion'
|
359
365
|
require_relative 'rubocop/cop/lint/numbered_parameter_assignment'
|
366
|
+
require_relative 'rubocop/cop/lint/numeric_operation_with_constant_result'
|
360
367
|
require_relative 'rubocop/cop/lint/or_assignment_to_constant'
|
361
368
|
require_relative 'rubocop/cop/lint/ordered_magic_comments'
|
362
369
|
require_relative 'rubocop/cop/lint/out_of_range_regexp_ref'
|
@@ -402,6 +409,7 @@ require_relative 'rubocop/cop/lint/top_level_return_with_argument'
|
|
402
409
|
require_relative 'rubocop/cop/lint/trailing_comma_in_attribute_declaration'
|
403
410
|
require_relative 'rubocop/cop/lint/triple_quotes'
|
404
411
|
require_relative 'rubocop/cop/lint/underscore_prefixed_variable_name'
|
412
|
+
require_relative 'rubocop/cop/lint/unescaped_bracket_in_regexp'
|
405
413
|
require_relative 'rubocop/cop/lint/unexpected_block_arity'
|
406
414
|
require_relative 'rubocop/cop/lint/unified_integer'
|
407
415
|
require_relative 'rubocop/cop/lint/unmodified_reduce_accumulator'
|
@@ -413,6 +421,7 @@ require_relative 'rubocop/cop/lint/uri_escape_unescape'
|
|
413
421
|
require_relative 'rubocop/cop/lint/uri_regexp'
|
414
422
|
require_relative 'rubocop/cop/lint/useless_access_modifier'
|
415
423
|
require_relative 'rubocop/cop/lint/useless_assignment'
|
424
|
+
require_relative 'rubocop/cop/lint/useless_defined'
|
416
425
|
require_relative 'rubocop/cop/lint/useless_else_without_rescue'
|
417
426
|
require_relative 'rubocop/cop/lint/useless_method_definition'
|
418
427
|
require_relative 'rubocop/cop/lint/useless_numeric_operation'
|
@@ -459,6 +468,7 @@ require_relative 'rubocop/cop/naming/variable_number'
|
|
459
468
|
require_relative 'rubocop/cop/style/access_modifier_declarations'
|
460
469
|
require_relative 'rubocop/cop/style/accessor_grouping'
|
461
470
|
require_relative 'rubocop/cop/style/alias'
|
471
|
+
require_relative 'rubocop/cop/style/ambiguous_endless_method_definition'
|
462
472
|
require_relative 'rubocop/cop/style/and_or'
|
463
473
|
require_relative 'rubocop/cop/style/arguments_forwarding'
|
464
474
|
require_relative 'rubocop/cop/style/array_coercion'
|
@@ -471,6 +481,7 @@ require_relative 'rubocop/cop/style/auto_resource_cleanup'
|
|
471
481
|
require_relative 'rubocop/cop/style/bare_percent_literals'
|
472
482
|
require_relative 'rubocop/cop/style/begin_block'
|
473
483
|
require_relative 'rubocop/cop/style/bisected_attr_accessor'
|
484
|
+
require_relative 'rubocop/cop/style/bitwise_predicate'
|
474
485
|
require_relative 'rubocop/cop/style/block_comments'
|
475
486
|
require_relative 'rubocop/cop/style/block_delimiters'
|
476
487
|
require_relative 'rubocop/cop/style/case_equality'
|
@@ -486,6 +497,7 @@ require_relative 'rubocop/cop/style/collection_compact'
|
|
486
497
|
require_relative 'rubocop/cop/style/collection_methods'
|
487
498
|
require_relative 'rubocop/cop/style/colon_method_call'
|
488
499
|
require_relative 'rubocop/cop/style/colon_method_definition'
|
500
|
+
require_relative 'rubocop/cop/style/combinable_defined'
|
489
501
|
require_relative 'rubocop/cop/style/combinable_loops'
|
490
502
|
require_relative 'rubocop/cop/style/command_literal'
|
491
503
|
require_relative 'rubocop/cop/style/comment_annotation'
|
@@ -498,6 +510,7 @@ require_relative 'rubocop/cop/style/copyright'
|
|
498
510
|
require_relative 'rubocop/cop/style/data_inheritance'
|
499
511
|
require_relative 'rubocop/cop/style/date_time'
|
500
512
|
require_relative 'rubocop/cop/style/def_with_parentheses'
|
513
|
+
require_relative 'rubocop/cop/style/dig_chain'
|
501
514
|
require_relative 'rubocop/cop/style/dir'
|
502
515
|
require_relative 'rubocop/cop/style/dir_empty'
|
503
516
|
require_relative 'rubocop/cop/style/disable_cops_within_source_code_directive'
|
@@ -527,7 +540,9 @@ require_relative 'rubocop/cop/style/explicit_block_argument'
|
|
527
540
|
require_relative 'rubocop/cop/style/exponential_notation'
|
528
541
|
require_relative 'rubocop/cop/style/fetch_env_var'
|
529
542
|
require_relative 'rubocop/cop/style/file_empty'
|
543
|
+
require_relative 'rubocop/cop/style/file_null'
|
530
544
|
require_relative 'rubocop/cop/style/file_read'
|
545
|
+
require_relative 'rubocop/cop/style/file_touch'
|
531
546
|
require_relative 'rubocop/cop/style/file_write'
|
532
547
|
require_relative 'rubocop/cop/style/float_division'
|
533
548
|
require_relative 'rubocop/cop/style/for'
|
@@ -558,6 +573,7 @@ require_relative 'rubocop/cop/style/inverse_methods'
|
|
558
573
|
require_relative 'rubocop/cop/style/inline_comment'
|
559
574
|
require_relative 'rubocop/cop/style/invertible_unless_condition'
|
560
575
|
require_relative 'rubocop/cop/style/ip_addresses'
|
576
|
+
require_relative 'rubocop/cop/style/keyword_arguments_merging'
|
561
577
|
require_relative 'rubocop/cop/style/keyword_parameters_order'
|
562
578
|
require_relative 'rubocop/cop/style/lambda'
|
563
579
|
require_relative 'rubocop/cop/style/lambda_call'
|
@@ -591,6 +607,7 @@ require_relative 'rubocop/cop/style/redundant_regexp_constructor'
|
|
591
607
|
require_relative 'rubocop/cop/style/redundant_self_assignment'
|
592
608
|
require_relative 'rubocop/cop/style/redundant_self_assignment_branch'
|
593
609
|
require_relative 'rubocop/cop/style/require_order'
|
610
|
+
require_relative 'rubocop/cop/style/safe_navigation_chain_length'
|
594
611
|
require_relative 'rubocop/cop/style/single_line_do_end_block'
|
595
612
|
require_relative 'rubocop/cop/style/sole_nested_conditional'
|
596
613
|
require_relative 'rubocop/cop/style/static_class'
|
@@ -750,6 +767,7 @@ require_relative 'rubocop/config_store'
|
|
750
767
|
require_relative 'rubocop/config_validator'
|
751
768
|
require_relative 'rubocop/feature_loader'
|
752
769
|
require_relative 'rubocop/lockfile'
|
770
|
+
require_relative 'rubocop/lsp'
|
753
771
|
require_relative 'rubocop/target_finder'
|
754
772
|
require_relative 'rubocop/directive_comment'
|
755
773
|
require_relative 'rubocop/comment_config'
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.69.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
8
8
|
- Jonas Arvidsson
|
9
9
|
- Yuji Nakayama
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
requirements:
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: 2.9.3
|
98
98
|
- - "<"
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '3.0'
|
@@ -104,7 +104,7 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version:
|
107
|
+
version: 2.9.3
|
108
108
|
- - "<"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.0'
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.36.2
|
118
118
|
- - "<"
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '2.0'
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
requirements:
|
125
125
|
- - ">="
|
126
126
|
- !ruby/object:Gem::Version
|
127
|
-
version: 1.
|
127
|
+
version: 1.36.2
|
128
128
|
- - "<"
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '2.0'
|
@@ -151,7 +151,7 @@ dependencies:
|
|
151
151
|
version: 2.4.0
|
152
152
|
- - "<"
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: '
|
154
|
+
version: '4.0'
|
155
155
|
type: :runtime
|
156
156
|
prerelease: false
|
157
157
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -161,7 +161,7 @@ dependencies:
|
|
161
161
|
version: 2.4.0
|
162
162
|
- - "<"
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: '
|
164
|
+
version: '4.0'
|
165
165
|
description: |
|
166
166
|
RuboCop is a Ruby code style checking and code formatting tool.
|
167
167
|
It aims to enforce the community-driven Ruby Style Guide.
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- assets/output.css.erb
|
180
180
|
- assets/output.html.erb
|
181
181
|
- config/default.yml
|
182
|
+
- config/internal_affairs.yml
|
182
183
|
- config/obsoletion.yml
|
183
184
|
- exe/rubocop
|
184
185
|
- lib/rubocop.rb
|
@@ -281,6 +282,7 @@ files:
|
|
281
282
|
- lib/rubocop/cop/internal_affairs/node_type_predicate.rb
|
282
283
|
- lib/rubocop/cop/internal_affairs/numblock_handler.rb
|
283
284
|
- lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
|
285
|
+
- lib/rubocop/cop/internal_affairs/operator_keyword.rb
|
284
286
|
- lib/rubocop/cop/internal_affairs/processed_source_buffer_name.rb
|
285
287
|
- lib/rubocop/cop/internal_affairs/redundant_context_config_parameter.rb
|
286
288
|
- lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb
|
@@ -425,6 +427,7 @@ files:
|
|
425
427
|
- lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb
|
426
428
|
- lib/rubocop/cop/lint/duplicate_require.rb
|
427
429
|
- lib/rubocop/cop/lint/duplicate_rescue_exception.rb
|
430
|
+
- lib/rubocop/cop/lint/duplicate_set_element.rb
|
428
431
|
- lib/rubocop/cop/lint/each_with_object_argument.rb
|
429
432
|
- lib/rubocop/cop/lint/else_layout.rb
|
430
433
|
- lib/rubocop/cop/lint/empty_block.rb
|
@@ -443,6 +446,7 @@ files:
|
|
443
446
|
- lib/rubocop/cop/lint/float_out_of_range.rb
|
444
447
|
- lib/rubocop/cop/lint/format_parameter_mismatch.rb
|
445
448
|
- lib/rubocop/cop/lint/hash_compare_by_identity.rb
|
449
|
+
- lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb
|
446
450
|
- lib/rubocop/cop/lint/heredoc_method_call_position.rb
|
447
451
|
- lib/rubocop/cop/lint/identity_comparison.rb
|
448
452
|
- lib/rubocop/cop/lint/implicit_string_concatenation.rb
|
@@ -470,6 +474,7 @@ files:
|
|
470
474
|
- lib/rubocop/cop/lint/non_local_exit_from_iterator.rb
|
471
475
|
- lib/rubocop/cop/lint/number_conversion.rb
|
472
476
|
- lib/rubocop/cop/lint/numbered_parameter_assignment.rb
|
477
|
+
- lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb
|
473
478
|
- lib/rubocop/cop/lint/or_assignment_to_constant.rb
|
474
479
|
- lib/rubocop/cop/lint/ordered_magic_comments.rb
|
475
480
|
- lib/rubocop/cop/lint/out_of_range_regexp_ref.rb
|
@@ -515,6 +520,7 @@ files:
|
|
515
520
|
- lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb
|
516
521
|
- lib/rubocop/cop/lint/triple_quotes.rb
|
517
522
|
- lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
|
523
|
+
- lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb
|
518
524
|
- lib/rubocop/cop/lint/unexpected_block_arity.rb
|
519
525
|
- lib/rubocop/cop/lint/unified_integer.rb
|
520
526
|
- lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb
|
@@ -526,6 +532,7 @@ files:
|
|
526
532
|
- lib/rubocop/cop/lint/uri_regexp.rb
|
527
533
|
- lib/rubocop/cop/lint/useless_access_modifier.rb
|
528
534
|
- lib/rubocop/cop/lint/useless_assignment.rb
|
535
|
+
- lib/rubocop/cop/lint/useless_defined.rb
|
529
536
|
- lib/rubocop/cop/lint/useless_else_without_rescue.rb
|
530
537
|
- lib/rubocop/cop/lint/useless_method_definition.rb
|
531
538
|
- lib/rubocop/cop/lint/useless_numeric_operation.rb
|
@@ -562,6 +569,7 @@ files:
|
|
562
569
|
- lib/rubocop/cop/mixin/auto_corrector.rb
|
563
570
|
- lib/rubocop/cop/mixin/check_assignment.rb
|
564
571
|
- lib/rubocop/cop/mixin/check_line_breakable.rb
|
572
|
+
- lib/rubocop/cop/mixin/check_single_line_suitability.rb
|
565
573
|
- lib/rubocop/cop/mixin/code_length.rb
|
566
574
|
- lib/rubocop/cop/mixin/comments_help.rb
|
567
575
|
- lib/rubocop/cop/mixin/configurable_enforced_style.rb
|
@@ -570,11 +578,13 @@ files:
|
|
570
578
|
- lib/rubocop/cop/mixin/configurable_naming.rb
|
571
579
|
- lib/rubocop/cop/mixin/configurable_numbering.rb
|
572
580
|
- lib/rubocop/cop/mixin/def_node.rb
|
581
|
+
- lib/rubocop/cop/mixin/dig_help.rb
|
573
582
|
- lib/rubocop/cop/mixin/documentation_comment.rb
|
574
583
|
- lib/rubocop/cop/mixin/duplication.rb
|
575
584
|
- lib/rubocop/cop/mixin/empty_lines_around_body.rb
|
576
585
|
- lib/rubocop/cop/mixin/empty_parameter.rb
|
577
586
|
- lib/rubocop/cop/mixin/end_keyword_alignment.rb
|
587
|
+
- lib/rubocop/cop/mixin/endless_method_rewriter.rb
|
578
588
|
- lib/rubocop/cop/mixin/enforce_superclass.rb
|
579
589
|
- lib/rubocop/cop/mixin/first_element_line_break.rb
|
580
590
|
- lib/rubocop/cop/mixin/frozen_string_literal.rb
|
@@ -654,6 +664,7 @@ files:
|
|
654
664
|
- lib/rubocop/cop/style/access_modifier_declarations.rb
|
655
665
|
- lib/rubocop/cop/style/accessor_grouping.rb
|
656
666
|
- lib/rubocop/cop/style/alias.rb
|
667
|
+
- lib/rubocop/cop/style/ambiguous_endless_method_definition.rb
|
657
668
|
- lib/rubocop/cop/style/and_or.rb
|
658
669
|
- lib/rubocop/cop/style/arguments_forwarding.rb
|
659
670
|
- lib/rubocop/cop/style/array_coercion.rb
|
@@ -667,6 +678,7 @@ files:
|
|
667
678
|
- lib/rubocop/cop/style/begin_block.rb
|
668
679
|
- lib/rubocop/cop/style/bisected_attr_accessor.rb
|
669
680
|
- lib/rubocop/cop/style/bisected_attr_accessor/macro.rb
|
681
|
+
- lib/rubocop/cop/style/bitwise_predicate.rb
|
670
682
|
- lib/rubocop/cop/style/block_comments.rb
|
671
683
|
- lib/rubocop/cop/style/block_delimiters.rb
|
672
684
|
- lib/rubocop/cop/style/case_equality.rb
|
@@ -682,6 +694,7 @@ files:
|
|
682
694
|
- lib/rubocop/cop/style/collection_methods.rb
|
683
695
|
- lib/rubocop/cop/style/colon_method_call.rb
|
684
696
|
- lib/rubocop/cop/style/colon_method_definition.rb
|
697
|
+
- lib/rubocop/cop/style/combinable_defined.rb
|
685
698
|
- lib/rubocop/cop/style/combinable_loops.rb
|
686
699
|
- lib/rubocop/cop/style/command_literal.rb
|
687
700
|
- lib/rubocop/cop/style/comment_annotation.rb
|
@@ -694,6 +707,7 @@ files:
|
|
694
707
|
- lib/rubocop/cop/style/data_inheritance.rb
|
695
708
|
- lib/rubocop/cop/style/date_time.rb
|
696
709
|
- lib/rubocop/cop/style/def_with_parentheses.rb
|
710
|
+
- lib/rubocop/cop/style/dig_chain.rb
|
697
711
|
- lib/rubocop/cop/style/dir.rb
|
698
712
|
- lib/rubocop/cop/style/dir_empty.rb
|
699
713
|
- lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb
|
@@ -723,7 +737,9 @@ files:
|
|
723
737
|
- lib/rubocop/cop/style/exponential_notation.rb
|
724
738
|
- lib/rubocop/cop/style/fetch_env_var.rb
|
725
739
|
- lib/rubocop/cop/style/file_empty.rb
|
740
|
+
- lib/rubocop/cop/style/file_null.rb
|
726
741
|
- lib/rubocop/cop/style/file_read.rb
|
742
|
+
- lib/rubocop/cop/style/file_touch.rb
|
727
743
|
- lib/rubocop/cop/style/file_write.rb
|
728
744
|
- lib/rubocop/cop/style/float_division.rb
|
729
745
|
- lib/rubocop/cop/style/for.rb
|
@@ -754,6 +770,7 @@ files:
|
|
754
770
|
- lib/rubocop/cop/style/inverse_methods.rb
|
755
771
|
- lib/rubocop/cop/style/invertible_unless_condition.rb
|
756
772
|
- lib/rubocop/cop/style/ip_addresses.rb
|
773
|
+
- lib/rubocop/cop/style/keyword_arguments_merging.rb
|
757
774
|
- lib/rubocop/cop/style/keyword_parameters_order.rb
|
758
775
|
- lib/rubocop/cop/style/lambda.rb
|
759
776
|
- lib/rubocop/cop/style/lambda_call.rb
|
@@ -863,6 +880,7 @@ files:
|
|
863
880
|
- lib/rubocop/cop/style/return_nil.rb
|
864
881
|
- lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb
|
865
882
|
- lib/rubocop/cop/style/safe_navigation.rb
|
883
|
+
- lib/rubocop/cop/style/safe_navigation_chain_length.rb
|
866
884
|
- lib/rubocop/cop/style/sample.rb
|
867
885
|
- lib/rubocop/cop/style/select_by_regexp.rb
|
868
886
|
- lib/rubocop/cop/style/self_assignment.rb
|
@@ -1017,12 +1035,12 @@ licenses:
|
|
1017
1035
|
- MIT
|
1018
1036
|
metadata:
|
1019
1037
|
homepage_uri: https://rubocop.org/
|
1020
|
-
changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.
|
1038
|
+
changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.69.1
|
1021
1039
|
source_code_uri: https://github.com/rubocop/rubocop/
|
1022
|
-
documentation_uri: https://docs.rubocop.org/rubocop/1.
|
1040
|
+
documentation_uri: https://docs.rubocop.org/rubocop/1.69/
|
1023
1041
|
bug_tracker_uri: https://github.com/rubocop/rubocop/issues
|
1024
1042
|
rubygems_mfa_required: 'true'
|
1025
|
-
post_install_message:
|
1043
|
+
post_install_message:
|
1026
1044
|
rdoc_options: []
|
1027
1045
|
require_paths:
|
1028
1046
|
- lib
|
@@ -1037,8 +1055,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1037
1055
|
- !ruby/object:Gem::Version
|
1038
1056
|
version: '0'
|
1039
1057
|
requirements: []
|
1040
|
-
rubygems_version: 3.
|
1041
|
-
signing_key:
|
1058
|
+
rubygems_version: 3.3.7
|
1059
|
+
signing_key:
|
1042
1060
|
specification_version: 4
|
1043
1061
|
summary: Automatic Ruby code style checking tool.
|
1044
1062
|
test_files: []
|