super-pro-sys 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/rubocop-1.88.1/LICENSE.txt +20 -0
- data/rubocop-1.88.1/README.md +255 -0
- data/rubocop-1.88.1/assets/logo.png +0 -0
- data/rubocop-1.88.1/assets/output.css.erb +159 -0
- data/rubocop-1.88.1/assets/output.html.erb +102 -0
- data/rubocop-1.88.1/config/default.yml +6242 -0
- data/rubocop-1.88.1/config/internal_affairs.yml +31 -0
- data/rubocop-1.88.1/config/obsoletion.yml +272 -0
- data/rubocop-1.88.1/exe/rubocop +17 -0
- data/rubocop-1.88.1/lib/rubocop/arguments_env.rb +17 -0
- data/rubocop-1.88.1/lib/rubocop/arguments_file.rb +17 -0
- data/rubocop-1.88.1/lib/rubocop/ast_aliases.rb +8 -0
- data/rubocop-1.88.1/lib/rubocop/cache_config.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cached_data.rb +74 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/auto_generate_config.rb +199 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/base.rb +35 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/execute_runner.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/init_dotfile.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/list_enabled_cops_for.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/lsp.rb +19 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/mcp.rb +19 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/show_cops.rb +96 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/show_docs_url.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/suggest_extensions.rb +132 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command/version.rb +18 -0
- data/rubocop-1.88.1/lib/rubocop/cli/command.rb +22 -0
- data/rubocop-1.88.1/lib/rubocop/cli/environment.rb +22 -0
- data/rubocop-1.88.1/lib/rubocop/cli.rb +249 -0
- data/rubocop-1.88.1/lib/rubocop/comment_config.rb +258 -0
- data/rubocop-1.88.1/lib/rubocop/config.rb +404 -0
- data/rubocop-1.88.1/lib/rubocop/config_finder.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/config_loader.rb +284 -0
- data/rubocop-1.88.1/lib/rubocop/config_loader_resolver.rb +322 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/changed_enforced_styles.rb +33 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/changed_parameter.rb +26 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/cop_rule.rb +33 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/extracted_cop.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/parameter_rule.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/removed_cop.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/renamed_cop.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/rule.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion/split_cop.rb +27 -0
- data/rubocop-1.88.1/lib/rubocop/config_obsoletion.rb +155 -0
- data/rubocop-1.88.1/lib/rubocop/config_regeneration.rb +33 -0
- data/rubocop-1.88.1/lib/rubocop/config_store.rb +77 -0
- data/rubocop-1.88.1/lib/rubocop/config_validator.rb +291 -0
- data/rubocop-1.88.1/lib/rubocop/cop/autocorrect_logic.rb +164 -0
- data/rubocop-1.88.1/lib/rubocop/cop/badge.rb +68 -0
- data/rubocop-1.88.1/lib/rubocop/cop/base.rb +568 -0
- data/rubocop-1.88.1/lib/rubocop/cop/bundler/duplicated_gem.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/bundler/duplicated_group.rb +127 -0
- data/rubocop-1.88.1/lib/rubocop/cop/bundler/gem_comment.rb +173 -0
- data/rubocop-1.88.1/lib/rubocop/cop/bundler/gem_filename.rb +102 -0
- data/rubocop-1.88.1/lib/rubocop/cop/bundler/gem_version.rb +132 -0
- data/rubocop-1.88.1/lib/rubocop/cop/bundler/insecure_protocol_source.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/cop/bundler/ordered_gems.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/commissioner.rb +182 -0
- data/rubocop-1.88.1/lib/rubocop/cop/cop.rb +192 -0
- data/rubocop-1.88.1/lib/rubocop/cop/corrector.rb +138 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/alignment_corrector.rb +144 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/condition_corrector.rb +25 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/each_to_for_corrector.rb +47 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/empty_line_corrector.rb +25 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/for_to_each_corrector.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/if_then_corrector.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +145 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/line_break_corrector.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb +109 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/ordered_gem_corrector.rb +45 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/parentheses_corrector.rb +120 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/percent_literal_corrector.rb +116 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/punctuation_corrector.rb +27 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/require_library_corrector.rb +23 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/space_corrector.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/string_literal_corrector.rb +23 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors/unused_arg_corrector.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/correctors.rb +28 -0
- data/rubocop-1.88.1/lib/rubocop/cop/documentation.rb +65 -0
- data/rubocop-1.88.1/lib/rubocop/cop/exclude_limit.rb +52 -0
- data/rubocop-1.88.1/lib/rubocop/cop/force.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/add_runtime_dependency.rb +38 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/attribute_assignment.rb +91 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/dependency_version.rb +152 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/deprecated_attribute_assignment.rb +91 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/development_dependencies.rb +107 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/duplicated_assignment.rb +111 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/ordered_dependencies.rb +100 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/require_mfa.rb +162 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/required_ruby_version.rb +129 -0
- data/rubocop-1.88.1/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/generator/configuration_injector.rb +65 -0
- data/rubocop-1.88.1/lib/rubocop/cop/generator/require_file_injector.rb +75 -0
- data/rubocop-1.88.1/lib/rubocop/cop/generator.rb +223 -0
- data/rubocop-1.88.1/lib/rubocop/cop/ignored_node.rb +36 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/cop_description.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/cop_enabled.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/create_empty_file.rb +37 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/empty_line_between_expect_offense_and_correction.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/example_description.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/example_heredoc_delimiter.rb +111 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/inherit_deprecated_cop_class.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/itblock_handler.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/lambda_or_proc.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/location_exists.rb +142 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/location_expression.rb +38 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb +62 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/method_name_end_with.rb +82 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/method_name_equal.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_destructuring.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_first_or_last_argument.rb +54 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +241 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_processor.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_pattern_groups/ast_walker.rb +131 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_pattern_groups.rb +233 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_type_group.rb +92 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_type_multiple_predicates.rb +126 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/node_type_predicate.rb +42 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/numblock_handler.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/on_send_without_on_csend.rb +90 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/operator_keyword.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/plugin.rb +33 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/processed_source_buffer_name.rb +42 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_context_config_parameter.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_described_class_as_subject.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_expect_offense_arguments.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_let_rubocop_config_new.rb +75 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +53 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +61 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_method_dispatch_node.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/redundant_source_range.rb +75 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/single_line_comparison.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/style_detected_api_use.rb +146 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/undefined_config.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs/useless_restrict_on_send.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/internal_affairs.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/access_modifier_indentation.rb +104 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/argument_alignment.rb +151 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/array_alignment.rb +84 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/assignment_indentation.rb +57 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/begin_end_alignment.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/block_alignment.rb +313 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/block_end_newline.rb +83 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/case_indentation.rb +221 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/class_structure.rb +392 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/closing_heredoc_indentation.rb +123 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +193 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/comment_indentation.rb +168 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/condition_position.rb +70 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/def_end_alignment.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/dot_position.rb +139 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/else_alignment.rb +156 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_comment.rb +151 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +233 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_line_after_multiline_condition.rb +136 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_line_between_defs.rb +324 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb +101 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +241 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +82 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +140 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_block_body.rb +51 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +99 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +139 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +64 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/empty_lines_around_module_body.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/end_alignment.rb +217 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/end_of_line.rb +92 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/extra_spacing.rb +185 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_argument_indentation.rb +315 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_array_element_indentation.rb +189 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_array_element_line_break.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_hash_element_indentation.rb +239 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_hash_element_line_break.rb +68 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_method_argument_line_break.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_method_parameter_line_break.rb +75 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/first_parameter_indentation.rb +101 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/hash_alignment.rb +395 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +312 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/heredoc_indentation.rb +195 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/indentation_consistency.rb +205 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/indentation_style.rb +115 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/indentation_width.rb +533 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/initial_indentation.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/leading_comment_space.rb +203 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/leading_empty_lines.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/line_continuation_leading_space.rb +153 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/line_continuation_spacing.rb +146 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/line_end_string_concatenation_indentation.rb +143 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/line_length.rb +433 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +115 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_array_line_breaks.rb +65 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_assignment_layout.rb +124 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_block_layout.rb +164 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +115 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +74 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +112 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +132 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +453 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +128 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_method_parameter_line_breaks.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/multiline_operation_indentation.rb +130 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/parameter_alignment.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/redundant_line_break.rb +136 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +220 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/single_line_block_chain.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_after_colon.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_after_comma.rb +32 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_after_method_name.rb +39 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_after_not.rb +39 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_after_semicolon.rb +39 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_around_block_parameters.rb +162 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +89 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_around_keyword.rb +276 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_around_method_call_operator.rb +98 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_around_operators.rb +307 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_before_block_braces.rb +164 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_before_brackets.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_before_comma.rb +29 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_before_comment.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_before_first_arg.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_before_semicolon.rb +24 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_in_lambda_literal.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +239 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_block_braces.rb +268 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +215 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_parens.rb +176 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_range_literal.rb +54 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +143 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/trailing_empty_lines.rb +113 -0
- data/rubocop-1.88.1/lib/rubocop/cop/layout/trailing_whitespace.rb +133 -0
- data/rubocop-1.88.1/lib/rubocop/cop/legacy/corrections_proxy.rb +43 -0
- data/rubocop-1.88.1/lib/rubocop/cop/legacy/corrector.rb +37 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ambiguous_assignment.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ambiguous_block_association.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ambiguous_operator.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ambiguous_operator_precedence.rb +102 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ambiguous_range.rb +113 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/array_literal_in_regexp.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/assignment_in_condition.rb +119 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/big_decimal_new.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/boolean_symbol.rb +61 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/circular_argument_reference.rb +104 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/constant_definition_in_block.rb +100 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb +52 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/constant_reassignment.rb +230 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/constant_resolution.rb +93 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/cop_directive_syntax.rb +90 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/data_define_override.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/debugger.rb +143 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/deprecated_class_methods.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/deprecated_constants.rb +82 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +148 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +110 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_branch.rb +188 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_case_condition.rb +39 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_elsif_condition.rb +39 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_hash_key.rb +33 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_magic_comment.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_match_pattern.rb +122 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_methods.rb +445 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +84 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_require.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_rescue_exception.rb +47 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/duplicate_set_element.rb +87 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/each_with_object_argument.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/else_layout.rb +107 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_block.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_class.rb +95 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_conditional_body.rb +153 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_ensure.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_expression.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_file.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_in_pattern.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_interpolation.rb +42 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/empty_when.rb +68 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ensure_return.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/erb_new_arguments.rb +164 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/flip_flop.rb +38 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/float_comparison.rb +137 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/float_out_of_range.rb +28 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/format_parameter_mismatch.rb +191 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/hash_compare_by_identity.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/hash_new_with_keyword_arguments_as_default.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/heredoc_method_call_position.rb +152 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/identity_comparison.rb +54 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/implicit_string_concatenation.rb +112 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/incompatible_io_select_with_fiber_scheduler.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ineffective_access_modifier.rb +114 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/inherit_exception.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/interpolation_check.rb +84 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/it_without_arguments_in_block.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/lambda_without_literal_block.rb +51 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/literal_as_condition.rb +283 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/literal_assignment_in_condition.rb +95 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/literal_in_interpolation.rb +207 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/loop.rb +80 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +120 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/missing_super.rb +159 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/mixed_case_range.rb +113 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +37 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/multiple_comparison.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/nested_method_definition.rb +142 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/nested_percent_literal.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/next_without_accumulator.rb +53 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/no_return_in_begin_end_blocks.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/non_atomic_file_operation.rb +174 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/non_deterministic_require_order.rb +185 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +86 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/number_conversion.rb +209 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/numbered_parameter_assignment.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb +97 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/or_assignment_to_constant.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/ordered_magic_comments.rb +81 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb +129 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +77 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/percent_string_array.rb +74 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/percent_symbol_array.rb +64 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/raise_exception.rb +110 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/rand_one.rb +42 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +347 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +129 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_dir_glob_sort.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb +130 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_require_statement.rb +80 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_safe_navigation.rb +283 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_splat_expansion.rb +220 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_string_coercion.rb +68 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_type_conversion.rb +268 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_with_index.rb +87 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/redundant_with_object.rb +87 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/refinement_import_methods.rb +59 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/regexp_as_condition.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/require_parentheses.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/require_range_parentheses.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/require_relative_self_path.rb +52 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/rescue_exception.rb +38 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/rescue_type.rb +82 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/return_in_void_context.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/safe_navigation_chain.rb +134 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/safe_navigation_consistency.rb +166 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/script_permission.rb +77 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/self_assignment.rb +171 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/send_with_mixin_argument.rb +83 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/shadowed_argument.rb +177 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/shadowed_exception.rb +165 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +130 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/shared_mutable_default.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/struct_new_override.rb +75 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/suppressed_exception.rb +132 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/suppressed_exception_in_number_conversion.rb +123 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/symbol_conversion.rb +201 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/syntax.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/to_enum_arguments.rb +132 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/to_json.rb +45 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/top_level_return_with_argument.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/trailing_comma_in_attribute_declaration.rb +59 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/triple_quotes.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +80 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unescaped_bracket_in_regexp.rb +114 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unexpected_block_arity.rb +92 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unified_integer.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb +206 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unreachable_code.rb +146 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unreachable_loop.rb +208 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unreachable_pattern_branch.rb +113 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unused_block_argument.rb +172 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/unused_method_argument.rb +147 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/uri_escape_unescape.rb +81 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/uri_regexp.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_access_modifier.rb +321 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_assignment.rb +242 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_constant_scoping.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_default_value_argument.rb +92 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_defined.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_else_without_rescue.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_method_definition.rb +77 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_numeric_operation.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_or.rb +111 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_rescue.rb +89 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +131 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_setter_call.rb +161 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/useless_times.rb +135 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/utils/nil_receiver_checker.rb +147 -0
- data/rubocop-1.88.1/lib/rubocop/cop/lint/void.rb +299 -0
- data/rubocop-1.88.1/lib/rubocop/cop/message_annotator.rb +134 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/abc_size.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/block_length.rb +88 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/block_nesting.rb +95 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/class_length.rb +77 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/collection_literal_length.rb +83 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/method_length.rb +80 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/module_length.rb +62 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/parameter_lists.rb +147 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/perceived_complexity.rb +90 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +141 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/utils/code_length_calculator.rb +209 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/utils/iterating_block.rb +61 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/utils/repeated_attribute_discount.rb +143 -0
- data/rubocop-1.88.1/lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb +42 -0
- data/rubocop-1.88.1/lib/rubocop/cop/migration/department_name.rb +92 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/alignment.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/allowed_identifiers.rb +18 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/allowed_methods.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/allowed_pattern.rb +68 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/allowed_receivers.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/annotation_comment.rb +70 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/array_min_size.rb +57 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/array_syntax.rb +17 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/auto_corrector.rb +12 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/check_assignment.rb +36 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/check_line_breakable.rb +237 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/check_single_line_suitability.rb +47 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/code_length.rb +70 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/comments_help.rb +95 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/configurable_enforced_style.rb +112 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/configurable_formatting.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/configurable_max.rb +29 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/configurable_naming.rb +16 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/configurable_numbering.rb +18 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/def_node.rb +26 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/dig_help.rb +27 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/documentation_comment.rb +52 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/duplication.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/empty_lines_around_body.rb +172 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/empty_parameter.rb +25 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/end_keyword_alignment.rb +74 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/endless_method_rewriter.rb +24 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/enforce_superclass.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/first_element_line_break.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/forbidden_identifiers.rb +20 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/forbidden_pattern.rb +16 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/frozen_string_literal.rb +99 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/gem_declaration.rb +13 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/gemspec_help.rb +52 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/hash_alignment_styles.rb +157 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/hash_shorthand_syntax.rb +236 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/hash_subset.rb +211 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/hash_transform_method/autocorrection.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/hash_transform_method.rb +146 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/heredoc.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/integer_node.rb +14 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/interpolation.rb +25 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/line_length_help.rb +151 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/match_range.rb +23 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/method_complexity.rb +84 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/method_preference.rb +30 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/min_body_length.rb +21 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/min_branches_count.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/multiline_element_indentation.rb +109 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/multiline_element_line_breaks.rb +32 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +226 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +141 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/negative_conditional.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/nil_methods.rb +23 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/on_normal_if_unless.rb +14 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/ordered_gem_node.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/parentheses.rb +16 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/percent_array.rb +125 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/percent_literal.rb +32 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/preceding_following_alignment.rb +219 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/preferred_delimiters.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/project_index_help.rb +48 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/range_help.rb +160 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/rational_literal.rb +19 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/require_library.rb +61 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/rescue_node.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/safe_assignment.rb +27 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/space_after_punctuation.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/space_before_punctuation.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/statement_modifier.rb +109 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/string_help.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/string_literals_help.rb +33 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/surrounding_space.rb +134 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/symbol_help.rb +13 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/target_ruby_version.rb +36 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/trailing_body.rb +25 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/trailing_comma.rb +228 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/uncommunicative_name.rb +104 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/unused_argument.rb +29 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin/visibility_help.rb +72 -0
- data/rubocop-1.88.1/lib/rubocop/cop/mixin.rb +86 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/accessor_method_name.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/ascii_identifiers.rb +90 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +53 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/block_forwarding.rb +156 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/block_parameter_name.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/class_and_module_camel_case.rb +45 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/constant_name.rb +82 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/file_name.rb +246 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +68 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +57 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/inclusive_language.rb +303 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +303 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/method_name.rb +253 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/method_parameter_name.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/predicate_method.rb +330 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/predicate_prefix.rb +204 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +178 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/variable_name.rb +112 -0
- data/rubocop-1.88.1/lib/rubocop/cop/naming/variable_number.rb +155 -0
- data/rubocop-1.88.1/lib/rubocop/cop/offense.rb +254 -0
- data/rubocop-1.88.1/lib/rubocop/cop/registry.rb +342 -0
- data/rubocop-1.88.1/lib/rubocop/cop/security/compound_hash.rb +108 -0
- data/rubocop-1.88.1/lib/rubocop/cop/security/eval.rb +47 -0
- data/rubocop-1.88.1/lib/rubocop/cop/security/io_methods.rb +49 -0
- data/rubocop-1.88.1/lib/rubocop/cop/security/json_load.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/security/marshal_load.rb +39 -0
- data/rubocop-1.88.1/lib/rubocop/cop/security/open.rb +90 -0
- data/rubocop-1.88.1/lib/rubocop/cop/security/yaml_load.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/severity.rb +67 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/access_modifier_declarations.rb +376 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/accessor_grouping.rb +226 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/alias.rb +170 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/ambiguous_endless_method_definition.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/and_or.rb +159 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/arguments_forwarding.rb +582 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/array_coercion.rb +87 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/array_first_last.rb +91 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/array_intersect.rb +199 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/array_intersect_with_single_element.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/array_join.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/ascii_comments.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/attr.rb +83 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/auto_resource_cleanup.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/bare_percent_literals.rb +77 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/begin_block.rb +23 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/bisected_attr_accessor/macro.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/bisected_attr_accessor.rb +125 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/bitwise_predicate.rb +107 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/block_comments.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/block_delimiters.rb +510 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/case_equality.rb +122 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/case_like_if.rb +277 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/character_literal.rb +57 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/class_and_module_children.rb +244 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/class_check.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/class_equality_comparison.rb +142 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/class_methods.rb +54 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/class_methods_definitions.rb +164 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/class_vars.rb +64 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/collection_compact.rb +163 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/collection_methods.rb +93 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/collection_querying.rb +167 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/colon_method_call.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/colon_method_definition.rb +37 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/combinable_defined.rb +115 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/combinable_loops.rb +136 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/command_literal.rb +181 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/comment_annotation.rb +130 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/commented_keyword.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/comparable_between.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/comparable_clamp.rb +136 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/concat_array_literals.rb +101 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/conditional_assignment.rb +671 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/constant_visibility.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/copyright.rb +120 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/data_inheritance.rb +86 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/date_time.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/def_with_parentheses.rb +70 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/dig_chain.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/dir.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/dir_empty.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb +87 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/document_dynamic_eval_definition.rb +174 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/documentation.rb +198 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/documentation_method.rb +152 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/double_cop_disable_directive.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/double_negation.rb +159 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/each_for_simple_loop.rb +86 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/each_with_object.rb +140 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_block_parameter.rb +47 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_case_condition.rb +127 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_class_definition.rb +126 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_else.rb +207 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_heredoc.rb +64 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_lambda_parameter.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_literal.rb +156 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_method.rb +113 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/empty_string_inside_interpolation.rb +110 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/encoding.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/end_block.rb +30 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/endless_method.rb +251 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/env_home.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/eval_with_location.rb +229 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/even_odd.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/exact_regexp_match.rb +76 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/expand_path_arguments.rb +191 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/explicit_block_argument.rb +166 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/exponential_notation.rb +117 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/fetch_env_var.rb +159 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/file_empty.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/file_null.rb +91 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/file_open.rb +84 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/file_read.rb +109 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/file_touch.rb +75 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/file_write.rb +138 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/float_division.rb +169 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/for.rb +93 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/format_string.rb +167 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/format_string_token.rb +299 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/frozen_string_literal_comment.rb +221 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/global_std_stream.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/global_vars.rb +81 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/guard_clause.rb +324 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_as_last_array_item.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_conversion.rb +151 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_each_methods.rb +221 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_except.rb +80 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_fetch_chain.rb +104 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_like_case.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_lookup_method.rb +106 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_slice.rb +96 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_syntax.rb +309 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_transform_keys.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/hash_transform_values.rb +103 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/identical_conditional_branches.rb +273 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/if_inside_else.rb +161 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/if_unless_modifier.rb +362 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/if_with_boolean_literal_branches.rb +166 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/if_with_semicolon.rb +142 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/implicit_runtime_error.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/in_pattern_then.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/infinite_loop.rb +127 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/inline_comment.rb +37 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/inverse_methods.rb +200 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/invertible_unless_condition.rb +160 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/ip_addresses.rb +74 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/it_assignment.rb +93 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/it_block_parameter.rb +121 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/keyword_arguments_merging.rb +71 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/keyword_parameters_order.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/lambda.rb +132 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/lambda_call.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/line_end_concatenation.rb +143 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/magic_comment_format.rb +307 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/map_compact_with_conditional_block.rb +179 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/map_into_array.rb +236 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/map_join.rb +123 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/map_to_hash.rb +90 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/map_to_set.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +259 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +61 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +277 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +124 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/method_called_on_do_end_block.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/method_def_parentheses.rb +178 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/min_max.rb +64 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/min_max_comparison.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/missing_else.rb +185 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/missing_respond_to_missing.rb +82 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/mixin_grouping.rb +135 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/mixin_usage.rb +72 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/module_function.rb +170 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/module_member_existence_check.rb +110 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_block_chain.rb +51 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_if_modifier.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_if_then.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_in_pattern_then.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_memoization.rb +102 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_method_signature.rb +100 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_ternary_operator.rb +102 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiline_when_then.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/multiple_comparison.rb +164 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/mutable_constant.rb +340 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/negated_if.rb +98 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/negated_if_else_condition.rb +137 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/negated_unless.rb +88 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/negated_while.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/negative_array_index.rb +220 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/nested_file_dirname.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/nested_modifier.rb +100 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/nested_parenthesized_calls.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/nested_ternary_operator.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/next.rb +277 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/nil_comparison.rb +86 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/nil_lambda.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/non_nil_check.rb +152 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/not.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/numbered_parameters.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/numbered_parameters_limit.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/numeric_literal_prefix.rb +119 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/numeric_literals.rb +130 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/numeric_predicate.rb +185 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/object_then.rb +76 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/one_class_per_file.rb +115 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/one_line_conditional.rb +157 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/open_struct_use.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/operator_method_call.rb +100 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/option_hash.rb +54 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/optional_arguments.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/optional_boolean_parameter.rb +64 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/or_assignment.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/parallel_assignment.rb +322 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/parentheses_around_condition.rb +136 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/partition_instead_of_double_select.rb +270 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/percent_literal_delimiters.rb +122 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/percent_q_literals.rb +70 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/perl_backrefs.rb +129 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/predicate_with_kind.rb +84 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/preferred_hash_methods.rb +74 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/proc.rb +38 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/quoted_symbols.rb +122 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/raise_args.rb +160 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/random_with_offset.rb +153 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/reduce_to_hash.rb +200 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_argument.rb +131 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_array_constructor.rb +77 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_array_flatten.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_assignment.rb +114 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_begin.rb +239 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_capital_w.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_condition.rb +345 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_conditional.rb +84 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_constant_base.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_current_directory_in_path.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_double_splat_hash_braces.rb +129 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_each.rb +119 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_exception.rb +91 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_fetch_block.rb +113 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_file_extension_in_require.rb +61 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_filter_chain.rb +118 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_format.rb +312 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_freeze.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_heredoc_delimiter_quotes.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_initialize.rb +165 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_interpolation.rb +147 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_interpolation_unfreeze.rb +62 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_line_continuation.rb +260 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_min_max_by.rb +93 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_parentheses.rb +363 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_percent_q.rb +110 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_regexp_argument.rb +116 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_regexp_character_class.rb +119 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_regexp_constructor.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_regexp_escape.rb +132 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_return.rb +191 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_self.rb +224 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_self_assignment.rb +106 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_self_assignment_branch.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_sort.rb +209 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_sort_by.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_string_escape.rb +185 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/redundant_struct_keyword_init.rb +133 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/regexp_literal.rb +260 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/require_order.rb +139 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/rescue_modifier.rb +112 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/rescue_standard_error.rb +126 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/return_nil.rb +99 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb +137 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/reverse_find.rb +51 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/safe_navigation.rb +427 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/safe_navigation_chain_length.rb +52 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/sample.rb +144 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/select_by_kind.rb +158 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/select_by_range.rb +197 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/select_by_regexp.rb +199 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/self_assignment.rb +95 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/semicolon.rb +205 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/send.rb +29 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/send_with_literal_method_name.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/signal_exception.rb +217 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/single_argument_dig.rb +73 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/single_line_block_params.rb +119 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/single_line_do_end_block.rb +91 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/single_line_methods.rb +149 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/slicing_with_range.rb +146 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/sole_nested_conditional.rb +246 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/special_global_vars.rb +264 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/static_class.rb +128 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/stderr_puts.rb +57 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/string_chars.rb +42 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/string_concatenation.rb +182 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/string_hash_keys.rb +59 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/string_literals.rb +129 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/string_literals_in_interpolation.rb +76 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/string_methods.rb +36 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/strip.rb +45 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/struct_inheritance.rb +92 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/super_arguments.rb +221 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/super_with_args_parentheses.rb +35 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/swap_values.rb +101 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/symbol_array.rb +133 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/symbol_literal.rb +28 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/symbol_proc.rb +283 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/tally_method.rb +181 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/ternary_parentheses.rb +251 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/top_level_method_definition.rb +86 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_body_on_class.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_body_on_method_definition.rb +55 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_body_on_module.rb +40 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +160 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +137 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_comma_in_block_args.rb +105 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +139 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_method_end_statement.rb +63 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trailing_underscore_variable.rb +151 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/trivial_accessors.rb +254 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/unless_else.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/unless_logical_operators.rb +106 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/unpack_first.rb +59 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/variable_interpolation.rb +44 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/when_then.rb +37 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/while_until_do.rb +54 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/while_until_modifier.rb +67 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/word_array.rb +156 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/yaml_file_read.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/yoda_condition.rb +185 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/yoda_expression.rb +92 -0
- data/rubocop-1.88.1/lib/rubocop/cop/style/zero_length_predicate.rb +157 -0
- data/rubocop-1.88.1/lib/rubocop/cop/team.rb +341 -0
- data/rubocop-1.88.1/lib/rubocop/cop/util.rb +215 -0
- data/rubocop-1.88.1/lib/rubocop/cop/utils/format_string.rb +148 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force/assignment.rb +156 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force/branch.rb +355 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force/branchable.rb +23 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force/reference.rb +47 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force/scope.rb +106 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force/variable.rb +127 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force/variable_table.rb +131 -0
- data/rubocop-1.88.1/lib/rubocop/cop/variable_force.rb +462 -0
- data/rubocop-1.88.1/lib/rubocop/cops_documentation_generator.rb +406 -0
- data/rubocop-1.88.1/lib/rubocop/core_ext/string.rb +19 -0
- data/rubocop-1.88.1/lib/rubocop/directive_comment.rb +224 -0
- data/rubocop-1.88.1/lib/rubocop/error.rb +35 -0
- data/rubocop-1.88.1/lib/rubocop/ext/comment.rb +18 -0
- data/rubocop-1.88.1/lib/rubocop/ext/processed_source.rb +20 -0
- data/rubocop-1.88.1/lib/rubocop/ext/range.rb +15 -0
- data/rubocop-1.88.1/lib/rubocop/ext/regexp_node.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/ext/regexp_parser.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/feature_loader.rb +94 -0
- data/rubocop-1.88.1/lib/rubocop/file_finder.rb +43 -0
- data/rubocop-1.88.1/lib/rubocop/file_patterns.rb +51 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/auto_gen_config_formatter.rb +17 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/base_formatter.rb +119 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/clang_style_formatter.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/colorizable.rb +41 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/disabled_config_formatter.rb +307 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/emacs_style_formatter.rb +39 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/file_list_formatter.rb +20 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/formatter_set.rb +114 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/fuubar_style_formatter.rb +80 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/github_actions_formatter.rb +57 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/html_formatter.rb +155 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/json_formatter.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/junit_formatter.rb +143 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/markdown_formatter.rb +79 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/offense_count_formatter.rb +93 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/pacman_formatter.rb +81 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/progress_formatter.rb +62 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/quiet_formatter.rb +13 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/simple_text_formatter.rb +170 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/tap_formatter.rb +85 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/text_util.rb +20 -0
- data/rubocop-1.88.1/lib/rubocop/formatter/worst_offenders_formatter.rb +64 -0
- data/rubocop-1.88.1/lib/rubocop/formatter.rb +35 -0
- data/rubocop-1.88.1/lib/rubocop/lockfile.rb +91 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/diagnostic.rb +174 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/disable_comment_edits.rb +135 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/logger.rb +22 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/routes.rb +263 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/runtime.rb +78 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/server.rb +70 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/severity.rb +27 -0
- data/rubocop-1.88.1/lib/rubocop/lsp/stdin_runner.rb +76 -0
- data/rubocop-1.88.1/lib/rubocop/lsp.rb +36 -0
- data/rubocop-1.88.1/lib/rubocop/magic_comment.rb +328 -0
- data/rubocop-1.88.1/lib/rubocop/mcp/server.rb +200 -0
- data/rubocop-1.88.1/lib/rubocop/name_similarity.rb +29 -0
- data/rubocop-1.88.1/lib/rubocop/options.rb +693 -0
- data/rubocop-1.88.1/lib/rubocop/path_util.rb +134 -0
- data/rubocop-1.88.1/lib/rubocop/pending_cops_reporter.rb +56 -0
- data/rubocop-1.88.1/lib/rubocop/platform.rb +11 -0
- data/rubocop-1.88.1/lib/rubocop/plugin/configuration_integrator.rb +143 -0
- data/rubocop-1.88.1/lib/rubocop/plugin/load_error.rb +26 -0
- data/rubocop-1.88.1/lib/rubocop/plugin/loader.rb +100 -0
- data/rubocop-1.88.1/lib/rubocop/plugin/not_supported_error.rb +29 -0
- data/rubocop-1.88.1/lib/rubocop/plugin.rb +46 -0
- data/rubocop-1.88.1/lib/rubocop/project_index_loader.rb +66 -0
- data/rubocop-1.88.1/lib/rubocop/rake_task.rb +109 -0
- data/rubocop-1.88.1/lib/rubocop/remote_config.rb +114 -0
- data/rubocop-1.88.1/lib/rubocop/result_cache.rb +259 -0
- data/rubocop-1.88.1/lib/rubocop/rspec/cop_helper.rb +119 -0
- data/rubocop-1.88.1/lib/rubocop/rspec/expect_offense.rb +354 -0
- data/rubocop-1.88.1/lib/rubocop/rspec/parallel_formatter.rb +90 -0
- data/rubocop-1.88.1/lib/rubocop/rspec/shared_contexts.rb +305 -0
- data/rubocop-1.88.1/lib/rubocop/rspec/support.rb +35 -0
- data/rubocop-1.88.1/lib/rubocop/runner.rb +602 -0
- data/rubocop-1.88.1/lib/rubocop/server/cache.rb +185 -0
- data/rubocop-1.88.1/lib/rubocop/server/cli.rb +147 -0
- data/rubocop-1.88.1/lib/rubocop/server/client_command/base.rb +54 -0
- data/rubocop-1.88.1/lib/rubocop/server/client_command/exec.rb +65 -0
- data/rubocop-1.88.1/lib/rubocop/server/client_command/restart.rb +25 -0
- data/rubocop-1.88.1/lib/rubocop/server/client_command/start.rb +58 -0
- data/rubocop-1.88.1/lib/rubocop/server/client_command/status.rb +28 -0
- data/rubocop-1.88.1/lib/rubocop/server/client_command/stop.rb +31 -0
- data/rubocop-1.88.1/lib/rubocop/server/client_command.rb +26 -0
- data/rubocop-1.88.1/lib/rubocop/server/core.rb +124 -0
- data/rubocop-1.88.1/lib/rubocop/server/errors.rb +23 -0
- data/rubocop-1.88.1/lib/rubocop/server/helper.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop/server/server_command/base.rb +50 -0
- data/rubocop-1.88.1/lib/rubocop/server/server_command/exec.rb +33 -0
- data/rubocop-1.88.1/lib/rubocop/server/server_command/stop.rb +24 -0
- data/rubocop-1.88.1/lib/rubocop/server/server_command.rb +21 -0
- data/rubocop-1.88.1/lib/rubocop/server/socket_reader.rb +69 -0
- data/rubocop-1.88.1/lib/rubocop/server.rb +53 -0
- data/rubocop-1.88.1/lib/rubocop/string_interpreter.rb +60 -0
- data/rubocop-1.88.1/lib/rubocop/target_finder.rb +228 -0
- data/rubocop-1.88.1/lib/rubocop/target_ruby.rb +314 -0
- data/rubocop-1.88.1/lib/rubocop/util.rb +16 -0
- data/rubocop-1.88.1/lib/rubocop/version.rb +178 -0
- data/rubocop-1.88.1/lib/rubocop/warning.rb +11 -0
- data/rubocop-1.88.1/lib/rubocop/yaml_duplication_checker.rb +34 -0
- data/rubocop-1.88.1/lib/rubocop.rb +756 -0
- data/rubocop-1.88.1/lib/ruby_lsp/rubocop/addon.rb +90 -0
- data/rubocop-1.88.1/lib/ruby_lsp/rubocop/runtime_adapter.rb +99 -0
- data/super-pro-sys.gemspec +12 -0
- metadata +970 -0
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'optparse'
|
|
4
|
+
require_relative 'arguments_env'
|
|
5
|
+
require_relative 'arguments_file'
|
|
6
|
+
|
|
7
|
+
module RuboCop
|
|
8
|
+
class IncorrectCopNameError < StandardError; end
|
|
9
|
+
|
|
10
|
+
class OptionArgumentError < StandardError; end
|
|
11
|
+
|
|
12
|
+
# This class handles command line options.
|
|
13
|
+
# @api private
|
|
14
|
+
class Options
|
|
15
|
+
E_STDIN_NO_PATH = '-s/--stdin requires exactly one path, relative to the ' \
|
|
16
|
+
'root of the project. RuboCop will use this path to determine which ' \
|
|
17
|
+
'cops are enabled (via eg. Include/Exclude), and so that certain cops ' \
|
|
18
|
+
'like Naming/FileName can be checked.'
|
|
19
|
+
EXITING_OPTIONS = %i[
|
|
20
|
+
version verbose_version show_cops list_enabled_cops_for show_docs_url lsp mcp
|
|
21
|
+
].freeze
|
|
22
|
+
DEFAULT_MAXIMUM_EXCLUSION_ITEMS = 15
|
|
23
|
+
|
|
24
|
+
def initialize
|
|
25
|
+
@options = {}
|
|
26
|
+
@validator = OptionsValidator.new(@options)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def parse(command_line_args)
|
|
30
|
+
args_from_file = ArgumentsFile.read_as_arguments
|
|
31
|
+
args_from_env = ArgumentsEnv.read_as_arguments
|
|
32
|
+
args = args_from_file.concat(args_from_env).concat(command_line_args)
|
|
33
|
+
|
|
34
|
+
define_options.parse!(args)
|
|
35
|
+
|
|
36
|
+
@validator.validate_compatibility
|
|
37
|
+
|
|
38
|
+
if @options[:stdin]
|
|
39
|
+
# The parser will put the file name given after --stdin into
|
|
40
|
+
# @options[:stdin]. If it did, then the args array should be empty.
|
|
41
|
+
raise OptionArgumentError, E_STDIN_NO_PATH if args.any?
|
|
42
|
+
|
|
43
|
+
# We want the STDIN contents in @options[:stdin] and the file name in
|
|
44
|
+
# args to simplify the rest of the processing.
|
|
45
|
+
args = [@options[:stdin]]
|
|
46
|
+
@options[:stdin] = $stdin.binmode.read
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
[@options, args]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
# rubocop:disable Metrics/AbcSize
|
|
55
|
+
def define_options
|
|
56
|
+
OptionParser.new do |opts|
|
|
57
|
+
opts.banner = rainbow.wrap('Usage: rubocop [options] [file1, file2, ...]').bright
|
|
58
|
+
|
|
59
|
+
add_check_options(opts)
|
|
60
|
+
add_cache_options(opts)
|
|
61
|
+
add_lsp_option(opts)
|
|
62
|
+
add_mcp_option(opts)
|
|
63
|
+
add_server_options(opts)
|
|
64
|
+
add_output_options(opts)
|
|
65
|
+
add_autocorrection_options(opts)
|
|
66
|
+
add_config_generation_options(opts)
|
|
67
|
+
add_additional_modes(opts)
|
|
68
|
+
add_general_options(opts)
|
|
69
|
+
|
|
70
|
+
# `stackprof` is not supported on JRuby and Windows.
|
|
71
|
+
add_profile_options(opts) if RUBY_ENGINE == 'ruby' && !Platform.windows?
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
# rubocop:enable Metrics/AbcSize
|
|
75
|
+
|
|
76
|
+
def add_check_options(opts) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
77
|
+
section(opts, 'Basic Options') do # rubocop:disable Metrics/BlockLength
|
|
78
|
+
option(opts, '-l', '--lint') do
|
|
79
|
+
@options[:only] ||= []
|
|
80
|
+
@options[:only] << 'Lint'
|
|
81
|
+
end
|
|
82
|
+
option(opts, '-x', '--fix-layout') do
|
|
83
|
+
@options[:only] ||= []
|
|
84
|
+
@options[:only] << 'Layout'
|
|
85
|
+
@options[:autocorrect] = true
|
|
86
|
+
end
|
|
87
|
+
option(opts, '--safe')
|
|
88
|
+
add_cop_selection_csv_option('except', opts)
|
|
89
|
+
add_cop_selection_csv_option('only', opts)
|
|
90
|
+
option(opts, '--only-guide-cops')
|
|
91
|
+
option(opts, '-F', '--fail-fast')
|
|
92
|
+
option(opts, '--disable-pending-cops')
|
|
93
|
+
option(opts, '--enable-pending-cops')
|
|
94
|
+
option(opts, '--disable-all-cops')
|
|
95
|
+
option(opts, '--enable-all-cops')
|
|
96
|
+
option(opts, '--ignore-disable-comments')
|
|
97
|
+
option(opts, '--force-exclusion')
|
|
98
|
+
option(opts, '--only-recognized-file-types')
|
|
99
|
+
option(opts, '--ignore-parent-exclusion')
|
|
100
|
+
option(opts, '--ignore-unrecognized-cops')
|
|
101
|
+
option(opts, '--force-default-config')
|
|
102
|
+
option(opts, '-s', '--stdin FILE')
|
|
103
|
+
option(opts, '--editor-mode')
|
|
104
|
+
option(opts, '-P', '--[no-]parallel')
|
|
105
|
+
option(opts, '--raise-cop-error')
|
|
106
|
+
add_severity_option(opts)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def add_output_options(opts) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
111
|
+
section(opts, 'Output Options') do
|
|
112
|
+
option(opts, '-f', '--format FORMATTER') do |key|
|
|
113
|
+
@options[:formatters] ||= []
|
|
114
|
+
@options[:formatters] << [key]
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
option(opts, '-D', '--[no-]display-cop-names')
|
|
118
|
+
option(opts, '-E', '--extra-details')
|
|
119
|
+
option(opts, '-S', '--display-style-guide')
|
|
120
|
+
|
|
121
|
+
option(opts, '-o', '--out FILE') do |path|
|
|
122
|
+
if @options[:formatters]
|
|
123
|
+
@options[:formatters].last << path
|
|
124
|
+
else
|
|
125
|
+
@options[:output_path] = path
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
option(opts, '--stderr')
|
|
130
|
+
option(opts, '--display-time')
|
|
131
|
+
option(opts, '--display-only-failed')
|
|
132
|
+
option(opts, '--display-only-fail-level-offenses')
|
|
133
|
+
option(opts, '--display-only-correctable')
|
|
134
|
+
option(opts, '--display-only-safe-correctable')
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# rubocop:todo Naming/InclusiveLanguage
|
|
139
|
+
# the autocorrect command-line arguments map to the autocorrect @options values like so:
|
|
140
|
+
# :fix_layout :autocorrect :safe_autocorrect :autocorrect_all
|
|
141
|
+
# -x, --fix-layout true true - -
|
|
142
|
+
# -a, --auto-correct - true true -
|
|
143
|
+
# --safe-auto-correct - true true -
|
|
144
|
+
# -A, --auto-correct-all - true - true
|
|
145
|
+
def add_autocorrection_options(opts) # rubocop:disable Metrics/MethodLength
|
|
146
|
+
section(opts, 'Autocorrection') do
|
|
147
|
+
option(opts, '-a', '--autocorrect') { @options[:safe_autocorrect] = true }
|
|
148
|
+
option(opts, '--auto-correct') do
|
|
149
|
+
handle_deprecated_option('--auto-correct', '--autocorrect')
|
|
150
|
+
@options[:safe_autocorrect] = true
|
|
151
|
+
end
|
|
152
|
+
option(opts, '--safe-auto-correct') do
|
|
153
|
+
handle_deprecated_option('--safe-auto-correct', '--autocorrect')
|
|
154
|
+
@options[:safe_autocorrect] = true
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
option(opts, '-A', '--autocorrect-all') { @options[:autocorrect] = true }
|
|
158
|
+
option(opts, '--auto-correct-all') do
|
|
159
|
+
handle_deprecated_option('--auto-correct-all', '--autocorrect-all')
|
|
160
|
+
@options[:autocorrect] = true
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
option(opts, '--disable-uncorrectable')
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
# rubocop:enable Naming/InclusiveLanguage
|
|
167
|
+
|
|
168
|
+
def add_config_generation_options(opts)
|
|
169
|
+
section(opts, 'Config Generation') do
|
|
170
|
+
option(opts, '--auto-gen-config')
|
|
171
|
+
|
|
172
|
+
option(opts, '--regenerate-todo') do
|
|
173
|
+
@options.replace(ConfigRegeneration.new.options.merge(@options))
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
option(opts, '--exclude-limit COUNT') { @validator.validate_exclude_limit_option }
|
|
177
|
+
option(opts, '--no-exclude-limit')
|
|
178
|
+
|
|
179
|
+
option(opts, '--[no-]offense-counts')
|
|
180
|
+
option(opts, '--[no-]auto-gen-only-exclude')
|
|
181
|
+
option(opts, '--[no-]auto-gen-timestamp')
|
|
182
|
+
option(opts, '--[no-]auto-gen-enforced-style')
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def add_cop_selection_csv_option(option, opts)
|
|
187
|
+
option(opts, "--#{option} [COP1,COP2,...]") do |list|
|
|
188
|
+
unless list
|
|
189
|
+
message = "--#{option} argument should be [COP1,COP2,...]."
|
|
190
|
+
|
|
191
|
+
raise OptionArgumentError, message
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
cop_names = list.empty? ? [''] : list.split(',')
|
|
195
|
+
cop_names.unshift('Lint/Syntax') if option == 'only' && !cop_names.include?('Lint/Syntax')
|
|
196
|
+
|
|
197
|
+
@options[:"#{option}"] = cop_names
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def add_severity_option(opts)
|
|
202
|
+
table = RuboCop::Cop::Severity::CODE_TABLE.merge(A: :autocorrect)
|
|
203
|
+
option(opts, '--fail-level SEVERITY',
|
|
204
|
+
RuboCop::Cop::Severity::NAMES + [:autocorrect],
|
|
205
|
+
table) do |severity|
|
|
206
|
+
@options[:fail_level] = severity
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
def add_cache_options(opts)
|
|
211
|
+
section(opts, 'Caching') do
|
|
212
|
+
option(opts, '-C', '--cache FLAG')
|
|
213
|
+
option(opts, '--cache-root DIR') { @validator.validate_cache_enabled_for_cache_root }
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def add_lsp_option(opts)
|
|
218
|
+
section(opts, 'LSP Option') do
|
|
219
|
+
option(opts, '--lsp')
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def add_mcp_option(opts)
|
|
224
|
+
section(opts, 'MCP Option') do
|
|
225
|
+
option(opts, '--mcp')
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
def add_server_options(opts)
|
|
230
|
+
section(opts, 'Server Options') do
|
|
231
|
+
option(opts, '--[no-]server')
|
|
232
|
+
option(opts, '--restart-server')
|
|
233
|
+
option(opts, '--start-server')
|
|
234
|
+
option(opts, '--stop-server')
|
|
235
|
+
option(opts, '--server-status')
|
|
236
|
+
option(opts, '--no-detach')
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
def add_additional_modes(opts)
|
|
241
|
+
section(opts, 'Additional Modes') do
|
|
242
|
+
option(opts, '-L', '--list-target-files')
|
|
243
|
+
option(opts, '--list-enabled-cops-for PATH')
|
|
244
|
+
option(opts, '--show-cops [COP1,COP2,...]') do |list|
|
|
245
|
+
@options[:show_cops] = list.nil? ? [] : list.split(',')
|
|
246
|
+
end
|
|
247
|
+
option(opts, '--show-docs-url [COP1,COP2,...]') do |list|
|
|
248
|
+
@options[:show_docs_url] = list.nil? ? [] : list.split(',')
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
def add_general_options(opts)
|
|
254
|
+
section(opts, 'General Options') do
|
|
255
|
+
option(opts, '--init')
|
|
256
|
+
option(opts, '-c', '--config FILE')
|
|
257
|
+
option(opts, '-d', '--debug')
|
|
258
|
+
option(opts, '--plugin FILE') { |f| plugin_feature(f) }
|
|
259
|
+
option(opts, '-r', '--require FILE') { |f| require_feature(f) }
|
|
260
|
+
option(opts, '--[no-]color')
|
|
261
|
+
option(opts, '-v', '--version')
|
|
262
|
+
option(opts, '-V', '--verbose-version')
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
def add_profile_options(opts)
|
|
267
|
+
section(opts, 'Profiling Options') do
|
|
268
|
+
option(opts, '--profile') do
|
|
269
|
+
@options[:profile] = true
|
|
270
|
+
@options[:cache] = 'false' unless @options.key?(:cache)
|
|
271
|
+
end
|
|
272
|
+
option(opts, '--memory')
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
def handle_deprecated_option(old_option, new_option)
|
|
277
|
+
warn rainbow.wrap("#{old_option} is deprecated; use #{new_option} instead.").yellow
|
|
278
|
+
@options[long_opt_symbol([new_option])] = @options.delete(long_opt_symbol([old_option]))
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
def rainbow
|
|
282
|
+
@rainbow ||= begin
|
|
283
|
+
rainbow = Rainbow.new
|
|
284
|
+
rainbow.enabled = false if ARGV.include?('--no-color')
|
|
285
|
+
rainbow
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Creates a section of options in order to separate them visually when
|
|
290
|
+
# using `--help`.
|
|
291
|
+
def section(opts, heading, &_block)
|
|
292
|
+
heading = rainbow.wrap(heading).bright
|
|
293
|
+
opts.separator("\n#{heading}:\n")
|
|
294
|
+
yield
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Sets a value in the @options hash, based on the given long option and its
|
|
298
|
+
# value, in addition to calling the block if a block is given.
|
|
299
|
+
def option(opts, *args)
|
|
300
|
+
long_opt_symbol = long_opt_symbol(args)
|
|
301
|
+
args += Array(OptionsHelp::TEXT[long_opt_symbol])
|
|
302
|
+
opts.on(*args) do |arg|
|
|
303
|
+
@options[long_opt_symbol] = arg
|
|
304
|
+
yield arg if block_given?
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Finds the option in `args` starting with -- and converts it to a symbol,
|
|
309
|
+
# e.g. [..., '--autocorrect', ...] to :autocorrect.
|
|
310
|
+
def long_opt_symbol(args)
|
|
311
|
+
long_opt = args.find { |arg| arg.start_with?('--') }
|
|
312
|
+
long_opt[2..].sub('[no-]', '').sub(/ .*/, '').tr('-', '_').gsub(/[\[\]]/, '').to_sym
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
def plugin_feature(file)
|
|
316
|
+
# If any features were added on the CLI from `--plugin`,
|
|
317
|
+
# add them to the config.
|
|
318
|
+
ConfigLoaderResolver.new.resolve_plugins(Config.new, file)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
def require_feature(file)
|
|
322
|
+
if Plugin.plugin_capable?(file)
|
|
323
|
+
# NOTE: Compatibility for before plugins style.
|
|
324
|
+
warn Rainbow(<<~MESSAGE).yellow
|
|
325
|
+
#{file} gem supports plugin, use `--plugin` instead of `--require`.
|
|
326
|
+
MESSAGE
|
|
327
|
+
plugin_feature(file)
|
|
328
|
+
else
|
|
329
|
+
# If any features were added on the CLI from `--require`,
|
|
330
|
+
# add them to the config.
|
|
331
|
+
require file
|
|
332
|
+
ConfigLoader.add_loaded_features(file)
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Validates option arguments and the options' compatibility with each other.
|
|
338
|
+
# @api private
|
|
339
|
+
class OptionsValidator
|
|
340
|
+
class << self
|
|
341
|
+
SYNTAX_DEPARTMENTS = %w[Syntax Lint/Syntax].freeze
|
|
342
|
+
private_constant :SYNTAX_DEPARTMENTS
|
|
343
|
+
|
|
344
|
+
# Cop name validation must be done later than option parsing, so it's not
|
|
345
|
+
# called from within Options.
|
|
346
|
+
def validate_cop_list(names)
|
|
347
|
+
return unless names
|
|
348
|
+
|
|
349
|
+
cop_names = Cop::Registry.global.names
|
|
350
|
+
departments = Cop::Registry.global.departments.map(&:to_s)
|
|
351
|
+
|
|
352
|
+
names.each do |name|
|
|
353
|
+
next if cop_names.include?(name)
|
|
354
|
+
next if departments.include?(name)
|
|
355
|
+
next if SYNTAX_DEPARTMENTS.include?(name)
|
|
356
|
+
|
|
357
|
+
raise IncorrectCopNameError, format_message_from(name, cop_names)
|
|
358
|
+
end
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
private
|
|
362
|
+
|
|
363
|
+
def format_message_from(name, cop_names)
|
|
364
|
+
message = 'Unrecognized cop or department: %<name>s.'
|
|
365
|
+
message_with_candidate = "%<message>s\nDid you mean? %<candidate>s"
|
|
366
|
+
corrections = NameSimilarity.find_similar_names(name, cop_names)
|
|
367
|
+
|
|
368
|
+
if corrections.empty?
|
|
369
|
+
format(message, name: name)
|
|
370
|
+
else
|
|
371
|
+
format(message_with_candidate, message: format(message, name: name),
|
|
372
|
+
candidate: corrections.join(', '))
|
|
373
|
+
end
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
def initialize(options)
|
|
378
|
+
@options = options
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
def validate_cop_options
|
|
382
|
+
%i[only except].each { |opt| OptionsValidator.validate_cop_list(@options[opt]) }
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# rubocop:disable Metrics/AbcSize
|
|
386
|
+
def validate_compatibility # rubocop:disable Metrics/MethodLength
|
|
387
|
+
if only_includes_redundant_disable?
|
|
388
|
+
raise OptionArgumentError, 'Lint/RedundantCopDisableDirective cannot be used with --only.'
|
|
389
|
+
end
|
|
390
|
+
raise OptionArgumentError, 'Syntax checking cannot be turned off.' if except_syntax?
|
|
391
|
+
unless boolean_or_empty_cache?
|
|
392
|
+
raise OptionArgumentError, '-C/--cache argument must be true or false'
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
validate_auto_gen_config
|
|
396
|
+
validate_autocorrect
|
|
397
|
+
validate_display_only_failed
|
|
398
|
+
validate_display_only_failed_and_display_only_correctable
|
|
399
|
+
validate_display_only_correctable_and_autocorrect
|
|
400
|
+
validate_lsp_and_editor_mode
|
|
401
|
+
validate_enable_all_cops_and_disable_all_cops
|
|
402
|
+
disable_parallel_when_invalid_option_combo
|
|
403
|
+
|
|
404
|
+
return if incompatible_options.size <= 1
|
|
405
|
+
|
|
406
|
+
raise OptionArgumentError, "Incompatible cli options: #{incompatible_options.inspect}"
|
|
407
|
+
end
|
|
408
|
+
# rubocop:enable Metrics/AbcSize
|
|
409
|
+
|
|
410
|
+
def validate_auto_gen_config
|
|
411
|
+
return if @options.key?(:auto_gen_config)
|
|
412
|
+
|
|
413
|
+
message = '--%<flag>s can only be used together with --auto-gen-config.'
|
|
414
|
+
|
|
415
|
+
%i[exclude_limit offense_counts auto_gen_timestamp
|
|
416
|
+
auto_gen_only_exclude].each do |option|
|
|
417
|
+
if @options.key?(option)
|
|
418
|
+
raise OptionArgumentError, format(message, flag: option.to_s.tr('_', '-'))
|
|
419
|
+
end
|
|
420
|
+
end
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
def validate_display_only_failed
|
|
424
|
+
return unless @options.key?(:display_only_failed)
|
|
425
|
+
return if @options[:format] == 'junit'
|
|
426
|
+
|
|
427
|
+
raise OptionArgumentError,
|
|
428
|
+
'--display-only-failed can only be used together with --format junit.'
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
def validate_display_only_correctable_and_autocorrect
|
|
432
|
+
return unless @options.key?(:autocorrect)
|
|
433
|
+
return if !@options.key?(:display_only_correctable) &&
|
|
434
|
+
!@options.key?(:display_only_safe_correctable)
|
|
435
|
+
|
|
436
|
+
raise OptionArgumentError,
|
|
437
|
+
'--autocorrect cannot be used with --display-only-[safe-]correctable.'
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
def validate_display_only_failed_and_display_only_correctable
|
|
441
|
+
return unless @options.key?(:display_only_failed)
|
|
442
|
+
return if !@options.key?(:display_only_correctable) &&
|
|
443
|
+
!@options.key?(:display_only_safe_correctable)
|
|
444
|
+
|
|
445
|
+
raise OptionArgumentError,
|
|
446
|
+
'--display-only-failed cannot be used together with other display options.'
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
def validate_lsp_and_editor_mode
|
|
450
|
+
return if !@options.key?(:lsp) || !@options.key?(:editor_mode)
|
|
451
|
+
|
|
452
|
+
raise OptionArgumentError, 'Do not specify `--editor-mode` as it is redundant in `--lsp`.'
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
def validate_enable_all_cops_and_disable_all_cops
|
|
456
|
+
return if !@options.key?(:enable_all_cops) || !@options.key?(:disable_all_cops)
|
|
457
|
+
|
|
458
|
+
raise OptionArgumentError,
|
|
459
|
+
'--enable-all-cops cannot be used together with --disable-all-cops.'
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
def validate_autocorrect
|
|
463
|
+
if @options.key?(:safe_autocorrect) && @options.key?(:autocorrect_all)
|
|
464
|
+
message = Rainbow(<<~MESSAGE).red
|
|
465
|
+
Error: Both safe and unsafe autocorrect options are specified, use only one.
|
|
466
|
+
MESSAGE
|
|
467
|
+
raise OptionArgumentError, message
|
|
468
|
+
end
|
|
469
|
+
return if @options.key?(:autocorrect)
|
|
470
|
+
return unless @options.key?(:disable_uncorrectable)
|
|
471
|
+
|
|
472
|
+
raise OptionArgumentError,
|
|
473
|
+
'--disable-uncorrectable can only be used together with --autocorrect.'
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
def disable_parallel_when_invalid_option_combo
|
|
477
|
+
return unless @options.key?(:parallel)
|
|
478
|
+
|
|
479
|
+
invalid_flags = invalid_arguments_for_parallel
|
|
480
|
+
|
|
481
|
+
return if invalid_flags.empty?
|
|
482
|
+
|
|
483
|
+
@options.delete(:parallel)
|
|
484
|
+
|
|
485
|
+
puts '-P/--parallel is being ignored because ' \
|
|
486
|
+
"it is not compatible with #{invalid_flags.join(', ')}."
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
def invalid_arguments_for_parallel
|
|
490
|
+
[('-F/--fail-fast' if @options.key?(:fail_fast)),
|
|
491
|
+
('--profile' if @options[:profile]),
|
|
492
|
+
('--memory' if @options[:memory]),
|
|
493
|
+
('--cache false' if @options > { cache: 'false' })].compact
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
def only_includes_redundant_disable?
|
|
497
|
+
@options.key?(:only) &&
|
|
498
|
+
(@options[:only] & %w[Lint/RedundantCopDisableDirective RedundantCopDisableDirective]).any?
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
def except_syntax?
|
|
502
|
+
@options.key?(:except) && (@options[:except] & %w[Lint/Syntax Syntax]).any?
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
def boolean_or_empty_cache?
|
|
506
|
+
!@options.key?(:cache) || %w[true false].include?(@options[:cache])
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
def incompatible_options
|
|
510
|
+
@incompatible_options ||= @options.keys & Options::EXITING_OPTIONS
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
def validate_exclude_limit_option
|
|
514
|
+
return if /^\d+$/.match?(@options[:exclude_limit])
|
|
515
|
+
|
|
516
|
+
# Emulate OptionParser's behavior to make failures consistent regardless
|
|
517
|
+
# of option order.
|
|
518
|
+
raise OptionParser::MissingArgument
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
def validate_cache_enabled_for_cache_root
|
|
522
|
+
return unless @options[:cache] == 'false'
|
|
523
|
+
|
|
524
|
+
raise OptionArgumentError, '--cache-root cannot be used with --cache false'
|
|
525
|
+
end
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
# This module contains help texts for command line options.
|
|
529
|
+
# @api private
|
|
530
|
+
# rubocop:disable Metrics/ModuleLength
|
|
531
|
+
module OptionsHelp
|
|
532
|
+
MAX_EXCL = RuboCop::Options::DEFAULT_MAXIMUM_EXCLUSION_ITEMS.to_s
|
|
533
|
+
FORMATTER_OPTION_LIST = RuboCop::Formatter::FormatterSet::BUILTIN_FORMATTERS_FOR_KEYS.keys
|
|
534
|
+
|
|
535
|
+
TEXT = {
|
|
536
|
+
only: 'Run only the given cop(s).',
|
|
537
|
+
only_guide_cops: ['Run only cops for rules that link to a',
|
|
538
|
+
'style guide.'],
|
|
539
|
+
except: 'Exclude the given cop(s).',
|
|
540
|
+
plugin: 'Load a RuboCop plugin.',
|
|
541
|
+
require: 'Require Ruby file.',
|
|
542
|
+
config: 'Specify configuration file.',
|
|
543
|
+
auto_gen_config: ['Generate a configuration file acting as a',
|
|
544
|
+
'TODO list.'],
|
|
545
|
+
regenerate_todo: ['Regenerate the TODO configuration file using',
|
|
546
|
+
'the last configuration. If there is no existing',
|
|
547
|
+
'TODO file, acts like --auto-gen-config.'],
|
|
548
|
+
offense_counts: ['Include offense counts in configuration',
|
|
549
|
+
'file generated by --auto-gen-config.',
|
|
550
|
+
'Default is true.'],
|
|
551
|
+
auto_gen_timestamp:
|
|
552
|
+
['Include the date and time when the --auto-gen-config',
|
|
553
|
+
'was run in the file it generates. Default is true.'],
|
|
554
|
+
auto_gen_enforced_style:
|
|
555
|
+
['Add a setting to the TODO configuration file to enforce',
|
|
556
|
+
'the style used, rather than a per-file exclusion',
|
|
557
|
+
'if one style is used in all files for cop with',
|
|
558
|
+
'EnforcedStyle as a configurable option',
|
|
559
|
+
'when the --auto-gen-config was run',
|
|
560
|
+
'in the file it generates. Default is true.'],
|
|
561
|
+
auto_gen_only_exclude:
|
|
562
|
+
['Generate only Exclude parameters and not Max',
|
|
563
|
+
'when running --auto-gen-config, except if the',
|
|
564
|
+
'number of files with offenses is bigger than',
|
|
565
|
+
'exclude-limit. Default is false.'],
|
|
566
|
+
exclude_limit: ['Set the limit for how many files to explicitly exclude.',
|
|
567
|
+
'If there are more files than the limit, the cop will',
|
|
568
|
+
"be disabled instead. Default is #{MAX_EXCL}."],
|
|
569
|
+
disable_uncorrectable: ['Used with --autocorrect to annotate any',
|
|
570
|
+
'offenses that do not support autocorrect',
|
|
571
|
+
'with `rubocop:todo` comments.'],
|
|
572
|
+
no_exclude_limit: ['Do not set the limit for how many files to exclude.'],
|
|
573
|
+
force_exclusion: ['Any files excluded by `Exclude` in configuration',
|
|
574
|
+
'files will be excluded, even if given explicitly',
|
|
575
|
+
'as arguments.'],
|
|
576
|
+
only_recognized_file_types: ['Inspect files given on the command line only if',
|
|
577
|
+
'they are listed in `AllCops/Include` parameters',
|
|
578
|
+
'of user configuration or default configuration.'],
|
|
579
|
+
ignore_disable_comments: ['Report offenses even if they have been manually disabled',
|
|
580
|
+
'with a `rubocop:disable` or `rubocop:todo` directive.'],
|
|
581
|
+
ignore_parent_exclusion: ['Prevent from inheriting `AllCops/Exclude` from',
|
|
582
|
+
'parent folders.'],
|
|
583
|
+
ignore_unrecognized_cops: ['Ignore unrecognized cops or departments in the config.'],
|
|
584
|
+
force_default_config: ['Use default configuration even if configuration',
|
|
585
|
+
'files are present in the directory tree.'],
|
|
586
|
+
format: ['Choose an output formatter. This option',
|
|
587
|
+
'can be specified multiple times to enable',
|
|
588
|
+
'multiple formatters at the same time.',
|
|
589
|
+
*FORMATTER_OPTION_LIST.map do |item|
|
|
590
|
+
" #{item}#{' (default)' if item == '[p]rogress'}"
|
|
591
|
+
end,
|
|
592
|
+
' custom formatter class name'],
|
|
593
|
+
out: ['Write output to a file instead of STDOUT.',
|
|
594
|
+
'This option applies to the previously',
|
|
595
|
+
'specified --format, or the default format',
|
|
596
|
+
'if no format is specified.'],
|
|
597
|
+
fail_level: ['Minimum severity for exit with error code.',
|
|
598
|
+
' [A] autocorrect',
|
|
599
|
+
' [I] info',
|
|
600
|
+
' [R] refactor',
|
|
601
|
+
' [C] convention',
|
|
602
|
+
' [W] warning',
|
|
603
|
+
' [E] error',
|
|
604
|
+
' [F] fatal'],
|
|
605
|
+
display_time: 'Display elapsed time in seconds.',
|
|
606
|
+
display_only_failed: ['Only output offense messages. Omit passing',
|
|
607
|
+
'cops. Only valid for --format junit.'],
|
|
608
|
+
display_only_fail_level_offenses:
|
|
609
|
+
['Only output offense messages at',
|
|
610
|
+
'the specified --fail-level or above.'],
|
|
611
|
+
display_only_correctable: ['Only output correctable offense messages.'],
|
|
612
|
+
display_only_safe_correctable: ['Only output safe-correctable offense messages',
|
|
613
|
+
'when combined with --display-only-correctable.'],
|
|
614
|
+
show_cops: ['Show the given cops, or all cops by',
|
|
615
|
+
'default, and their configurations for the',
|
|
616
|
+
'current directory.',
|
|
617
|
+
'You can use `*` as a wildcard.'],
|
|
618
|
+
show_docs_url: ['Display url to documentation for the given',
|
|
619
|
+
'cops, or base url by default.'],
|
|
620
|
+
fail_fast: ['Inspect files in order of modification',
|
|
621
|
+
'time and stop after the first file',
|
|
622
|
+
'containing offenses.'],
|
|
623
|
+
cache: ["Use result caching (FLAG=true) or don't",
|
|
624
|
+
'(FLAG=false), default determined by',
|
|
625
|
+
'configuration parameter AllCops: UseCache.'],
|
|
626
|
+
cache_root: ['Set the cache root directory.',
|
|
627
|
+
'Takes precedence over the configuration',
|
|
628
|
+
'parameter AllCops: CacheRootDirectory and',
|
|
629
|
+
'the $RUBOCOP_CACHE_ROOT environment variable.'],
|
|
630
|
+
debug: 'Display debug info.',
|
|
631
|
+
display_cop_names: ['Display cop names in offense messages.',
|
|
632
|
+
'Default is true.'],
|
|
633
|
+
disable_pending_cops: 'Run without pending cops.',
|
|
634
|
+
disable_all_cops: ['Run with all cops disabled by default,',
|
|
635
|
+
'except `Lint/Syntax`. Overrides',
|
|
636
|
+
'`AllCops/EnabledByDefault` and',
|
|
637
|
+
'`AllCops/DisabledByDefault` in config files.'],
|
|
638
|
+
display_style_guide: 'Display style guide URLs in offense messages.',
|
|
639
|
+
enable_pending_cops: 'Run with pending cops.',
|
|
640
|
+
enable_all_cops: ['Run with all cops enabled, including those',
|
|
641
|
+
'disabled by default. Overrides',
|
|
642
|
+
'`AllCops/EnabledByDefault` and',
|
|
643
|
+
'`AllCops/DisabledByDefault` in config files.'],
|
|
644
|
+
extra_details: 'Display extra details in offense messages.',
|
|
645
|
+
lint: 'Run only lint cops.',
|
|
646
|
+
safe: 'Run only safe cops.',
|
|
647
|
+
stderr: ['Write all output to stderr except for the',
|
|
648
|
+
'autocorrected source. This is especially useful',
|
|
649
|
+
'when combined with --autocorrect and --stdin.'],
|
|
650
|
+
list_target_files: 'List all files RuboCop will inspect.',
|
|
651
|
+
list_enabled_cops_for: ['List which cops will inspect a given file or',
|
|
652
|
+
'directory.'],
|
|
653
|
+
autocorrect: 'Autocorrect offenses (only when it\'s safe).',
|
|
654
|
+
auto_correct: '(same, deprecated)',
|
|
655
|
+
safe_auto_correct: '(same, deprecated)',
|
|
656
|
+
autocorrect_all: 'Autocorrect offenses (safe and unsafe).',
|
|
657
|
+
auto_correct_all: '(same, deprecated)',
|
|
658
|
+
fix_layout: 'Run only layout cops, with autocorrect on.',
|
|
659
|
+
color: 'Force color output on or off.',
|
|
660
|
+
version: 'Display version.',
|
|
661
|
+
verbose_version: 'Display verbose version.',
|
|
662
|
+
parallel: ['Use available CPUs to execute inspection in',
|
|
663
|
+
'parallel. Default is true.',
|
|
664
|
+
'You can specify the number of parallel processes using',
|
|
665
|
+
'the $PARALLEL_PROCESSOR_COUNT environment variable.'],
|
|
666
|
+
stdin: ['Pipe source from STDIN, using FILE in offense',
|
|
667
|
+
'reports. This is useful for editor integration.'],
|
|
668
|
+
editor_mode: ['Optimize real-time feedback in editors,',
|
|
669
|
+
'adjusting behaviors for editing experience.'],
|
|
670
|
+
init: 'Generate a .rubocop.yml file in the current directory.',
|
|
671
|
+
server: ['If a server process has not been started yet, start',
|
|
672
|
+
'the server process and execute inspection with server.',
|
|
673
|
+
'Default is false.',
|
|
674
|
+
'You can specify the server host and port with the',
|
|
675
|
+
'$RUBOCOP_SERVER_HOST and the $RUBOCOP_SERVER_PORT',
|
|
676
|
+
'environment variables.'],
|
|
677
|
+
restart_server: 'Restart server process.',
|
|
678
|
+
start_server: 'Start server process.',
|
|
679
|
+
stop_server: 'Stop server process.',
|
|
680
|
+
server_status: 'Show server status.',
|
|
681
|
+
no_detach: 'Run the server process in the foreground.',
|
|
682
|
+
lsp: 'Start a language server listening on STDIN.',
|
|
683
|
+
mcp: ['Start an MCP (Model Context Protocol) server that',
|
|
684
|
+
'communicates over stdio.'],
|
|
685
|
+
raise_cop_error: ['Raise cop-related errors with cause and location.',
|
|
686
|
+
'This is used to prevent cops from failing silently.',
|
|
687
|
+
'Default is false.'],
|
|
688
|
+
profile: 'Profile rubocop.',
|
|
689
|
+
memory: 'Profile rubocop memory usage.'
|
|
690
|
+
}.freeze
|
|
691
|
+
end
|
|
692
|
+
# rubocop:enable Metrics/ModuleLength
|
|
693
|
+
end
|