rbhint 0.8.5.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +20 -0
- data/README.md +107 -0
- data/assets/logo.png +0 -0
- data/assets/output.html.erb +261 -0
- data/bin/console +10 -0
- data/bin/setup +7 -0
- data/config/default.yml +4133 -0
- data/exe/rbhint +17 -0
- data/lib/rbhint.rb +6 -0
- data/lib/rbhint/version.rb +7 -0
- data/lib/rubocop.rb +588 -0
- data/lib/rubocop/ast_aliases.rb +8 -0
- data/lib/rubocop/cached_data.rb +58 -0
- data/lib/rubocop/cli.rb +133 -0
- data/lib/rubocop/cli/command.rb +21 -0
- data/lib/rubocop/cli/command/auto_genenerate_config.rb +105 -0
- data/lib/rubocop/cli/command/base.rb +33 -0
- data/lib/rubocop/cli/command/execute_runner.rb +76 -0
- data/lib/rubocop/cli/command/init_dotfile.rb +45 -0
- data/lib/rubocop/cli/command/show_cops.rb +76 -0
- data/lib/rubocop/cli/command/version.rb +17 -0
- data/lib/rubocop/cli/environment.rb +21 -0
- data/lib/rubocop/comment_config.rb +206 -0
- data/lib/rubocop/config.rb +281 -0
- data/lib/rubocop/config_loader.rb +277 -0
- data/lib/rubocop/config_loader_resolver.rb +234 -0
- data/lib/rubocop/config_obsoletion.rb +278 -0
- data/lib/rubocop/config_store.rb +58 -0
- data/lib/rubocop/config_validator.rb +223 -0
- data/lib/rubocop/cop/autocorrect_logic.rb +105 -0
- data/lib/rubocop/cop/badge.rb +73 -0
- data/lib/rubocop/cop/bundler/duplicated_gem.rb +73 -0
- data/lib/rubocop/cop/bundler/gem_comment.rb +133 -0
- data/lib/rubocop/cop/bundler/insecure_protocol_source.rb +69 -0
- data/lib/rubocop/cop/bundler/ordered_gems.rb +73 -0
- data/lib/rubocop/cop/commissioner.rb +124 -0
- data/lib/rubocop/cop/cop.rb +311 -0
- data/lib/rubocop/cop/corrector.rb +196 -0
- data/lib/rubocop/cop/correctors/alignment_corrector.rb +142 -0
- data/lib/rubocop/cop/correctors/condition_corrector.rb +27 -0
- data/lib/rubocop/cop/correctors/each_to_for_corrector.rb +53 -0
- data/lib/rubocop/cop/correctors/empty_line_corrector.rb +26 -0
- data/lib/rubocop/cop/correctors/for_to_each_corrector.rb +73 -0
- data/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb +136 -0
- data/lib/rubocop/cop/correctors/line_break_corrector.rb +61 -0
- data/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb +68 -0
- data/lib/rubocop/cop/correctors/ordered_gem_corrector.rb +44 -0
- data/lib/rubocop/cop/correctors/parentheses_corrector.rb +31 -0
- data/lib/rubocop/cop/correctors/percent_literal_corrector.rb +117 -0
- data/lib/rubocop/cop/correctors/punctuation_corrector.rb +29 -0
- data/lib/rubocop/cop/correctors/space_corrector.rb +46 -0
- data/lib/rubocop/cop/correctors/string_literal_corrector.rb +25 -0
- data/lib/rubocop/cop/correctors/unused_arg_corrector.rb +43 -0
- data/lib/rubocop/cop/force.rb +42 -0
- data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +104 -0
- data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +104 -0
- data/lib/rubocop/cop/gemspec/required_ruby_version.rb +85 -0
- data/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb +55 -0
- data/lib/rubocop/cop/generator.rb +223 -0
- data/lib/rubocop/cop/generator/configuration_injector.rb +66 -0
- data/lib/rubocop/cop/generator/require_file_injector.rb +78 -0
- data/lib/rubocop/cop/ignored_node.rb +36 -0
- data/lib/rubocop/cop/internal_affairs.rb +9 -0
- data/lib/rubocop/cop/internal_affairs/method_name_equal.rb +59 -0
- data/lib/rubocop/cop/internal_affairs/node_destructuring.rb +44 -0
- data/lib/rubocop/cop/internal_affairs/node_type_predicate.rb +44 -0
- data/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb +54 -0
- data/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb +48 -0
- data/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb +73 -0
- data/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb +52 -0
- data/lib/rubocop/cop/layout/access_modifier_indentation.rb +98 -0
- data/lib/rubocop/cop/layout/argument_alignment.rb +93 -0
- data/lib/rubocop/cop/layout/array_alignment.rb +82 -0
- data/lib/rubocop/cop/layout/assignment_indentation.rb +55 -0
- data/lib/rubocop/cop/layout/block_alignment.rb +244 -0
- data/lib/rubocop/cop/layout/block_end_newline.rb +64 -0
- data/lib/rubocop/cop/layout/case_indentation.rb +161 -0
- data/lib/rubocop/cop/layout/class_structure.rb +343 -0
- data/lib/rubocop/cop/layout/closing_heredoc_indentation.rb +126 -0
- data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +203 -0
- data/lib/rubocop/cop/layout/comment_indentation.rb +141 -0
- data/lib/rubocop/cop/layout/condition_position.rb +66 -0
- data/lib/rubocop/cop/layout/def_end_alignment.rb +74 -0
- data/lib/rubocop/cop/layout/dot_position.rb +105 -0
- data/lib/rubocop/cop/layout/else_alignment.rb +142 -0
- data/lib/rubocop/cop/layout/empty_comment.rb +151 -0
- data/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb +157 -0
- data/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb +64 -0
- data/lib/rubocop/cop/layout/empty_line_between_defs.rb +152 -0
- data/lib/rubocop/cop/layout/empty_lines.rb +76 -0
- data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +211 -0
- data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +99 -0
- data/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb +126 -0
- data/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb +45 -0
- data/lib/rubocop/cop/layout/empty_lines_around_block_body.rb +41 -0
- data/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +88 -0
- data/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb +136 -0
- data/lib/rubocop/cop/layout/empty_lines_around_method_body.rb +45 -0
- data/lib/rubocop/cop/layout/empty_lines_around_module_body.rb +62 -0
- data/lib/rubocop/cop/layout/end_alignment.rb +189 -0
- data/lib/rubocop/cop/layout/end_of_line.rb +92 -0
- data/lib/rubocop/cop/layout/extra_spacing.rb +201 -0
- data/lib/rubocop/cop/layout/first_argument_indentation.rb +247 -0
- data/lib/rubocop/cop/layout/first_array_element_indentation.rb +171 -0
- data/lib/rubocop/cop/layout/first_array_element_line_break.rb +45 -0
- data/lib/rubocop/cop/layout/first_hash_element_indentation.rb +184 -0
- data/lib/rubocop/cop/layout/first_hash_element_line_break.rb +37 -0
- data/lib/rubocop/cop/layout/first_method_argument_line_break.rb +53 -0
- data/lib/rubocop/cop/layout/first_method_parameter_line_break.rb +46 -0
- data/lib/rubocop/cop/layout/first_parameter_indentation.rb +100 -0
- data/lib/rubocop/cop/layout/hash_alignment.rb +366 -0
- data/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb +285 -0
- data/lib/rubocop/cop/layout/heredoc_indentation.rb +173 -0
- data/lib/rubocop/cop/layout/indentation_consistency.rb +202 -0
- data/lib/rubocop/cop/layout/indentation_style.rb +117 -0
- data/lib/rubocop/cop/layout/indentation_width.rb +362 -0
- data/lib/rubocop/cop/layout/initial_indentation.rb +59 -0
- data/lib/rubocop/cop/layout/leading_comment_space.rb +119 -0
- data/lib/rubocop/cop/layout/leading_empty_lines.rb +53 -0
- data/lib/rubocop/cop/layout/line_length.rb +280 -0
- data/lib/rubocop/cop/layout/multiline_array_brace_layout.rb +118 -0
- data/lib/rubocop/cop/layout/multiline_array_line_breaks.rb +39 -0
- data/lib/rubocop/cop/layout/multiline_assignment_layout.rb +95 -0
- data/lib/rubocop/cop/layout/multiline_block_layout.rb +155 -0
- data/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb +118 -0
- data/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb +50 -0
- data/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb +52 -0
- data/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb +134 -0
- data/lib/rubocop/cop/layout/multiline_method_call_indentation.rb +220 -0
- data/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb +131 -0
- data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +123 -0
- data/lib/rubocop/cop/layout/parameter_alignment.rb +118 -0
- data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +191 -0
- data/lib/rubocop/cop/layout/space_after_colon.rb +47 -0
- data/lib/rubocop/cop/layout/space_after_comma.rb +35 -0
- data/lib/rubocop/cop/layout/space_after_method_name.rb +42 -0
- data/lib/rubocop/cop/layout/space_after_not.rb +40 -0
- data/lib/rubocop/cop/layout/space_after_semicolon.rb +32 -0
- data/lib/rubocop/cop/layout/space_around_block_parameters.rb +169 -0
- data/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb +92 -0
- data/lib/rubocop/cop/layout/space_around_keyword.rb +244 -0
- data/lib/rubocop/cop/layout/space_around_method_call_operator.rb +131 -0
- data/lib/rubocop/cop/layout/space_around_operators.rb +242 -0
- data/lib/rubocop/cop/layout/space_before_block_braces.rb +136 -0
- data/lib/rubocop/cop/layout/space_before_comma.rb +31 -0
- data/lib/rubocop/cop/layout/space_before_comment.rb +33 -0
- data/lib/rubocop/cop/layout/space_before_first_arg.rb +75 -0
- data/lib/rubocop/cop/layout/space_before_semicolon.rb +27 -0
- data/lib/rubocop/cop/layout/space_in_lambda_literal.rb +82 -0
- data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +229 -0
- data/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb +53 -0
- data/lib/rubocop/cop/layout/space_inside_block_braces.rb +248 -0
- data/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb +200 -0
- data/lib/rubocop/cop/layout/space_inside_parens.rb +113 -0
- data/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb +65 -0
- data/lib/rubocop/cop/layout/space_inside_range_literal.rb +63 -0
- data/lib/rubocop/cop/layout/space_inside_reference_brackets.rb +148 -0
- data/lib/rubocop/cop/layout/space_inside_string_interpolation.rb +65 -0
- data/lib/rubocop/cop/layout/trailing_empty_lines.rb +113 -0
- data/lib/rubocop/cop/layout/trailing_whitespace.rb +77 -0
- data/lib/rubocop/cop/lint/ambiguous_block_association.rb +62 -0
- data/lib/rubocop/cop/lint/ambiguous_operator.rb +96 -0
- data/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb +57 -0
- data/lib/rubocop/cop/lint/assignment_in_condition.rb +97 -0
- data/lib/rubocop/cop/lint/big_decimal_new.rb +44 -0
- data/lib/rubocop/cop/lint/boolean_symbol.rb +50 -0
- data/lib/rubocop/cop/lint/circular_argument_reference.rb +72 -0
- data/lib/rubocop/cop/lint/debugger.rb +77 -0
- data/lib/rubocop/cop/lint/deprecated_class_methods.rb +111 -0
- data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +137 -0
- data/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb +81 -0
- data/lib/rubocop/cop/lint/duplicate_case_condition.rb +53 -0
- data/lib/rubocop/cop/lint/duplicate_hash_key.rb +38 -0
- data/lib/rubocop/cop/lint/duplicate_methods.rb +235 -0
- data/lib/rubocop/cop/lint/each_with_object_argument.rb +42 -0
- data/lib/rubocop/cop/lint/else_layout.rb +66 -0
- data/lib/rubocop/cop/lint/empty_ensure.rb +60 -0
- data/lib/rubocop/cop/lint/empty_expression.rb +42 -0
- data/lib/rubocop/cop/lint/empty_interpolation.rb +36 -0
- data/lib/rubocop/cop/lint/empty_when.rb +61 -0
- data/lib/rubocop/cop/lint/ensure_return.rb +63 -0
- data/lib/rubocop/cop/lint/erb_new_arguments.rb +162 -0
- data/lib/rubocop/cop/lint/flip_flop.rb +32 -0
- data/lib/rubocop/cop/lint/float_out_of_range.rb +35 -0
- data/lib/rubocop/cop/lint/format_parameter_mismatch.rb +159 -0
- data/lib/rubocop/cop/lint/heredoc_method_call_position.rb +156 -0
- data/lib/rubocop/cop/lint/implicit_string_concatenation.rb +101 -0
- data/lib/rubocop/cop/lint/ineffective_access_modifier.rb +127 -0
- data/lib/rubocop/cop/lint/inherit_exception.rb +100 -0
- data/lib/rubocop/cop/lint/interpolation_check.rb +40 -0
- data/lib/rubocop/cop/lint/literal_as_condition.rb +135 -0
- data/lib/rubocop/cop/lint/literal_in_interpolation.rb +98 -0
- data/lib/rubocop/cop/lint/loop.rb +65 -0
- data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +84 -0
- data/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb +69 -0
- data/lib/rubocop/cop/lint/multiple_comparison.rb +48 -0
- data/lib/rubocop/cop/lint/nested_method_definition.rb +104 -0
- data/lib/rubocop/cop/lint/nested_percent_literal.rb +51 -0
- data/lib/rubocop/cop/lint/next_without_accumulator.rb +50 -0
- data/lib/rubocop/cop/lint/non_deterministic_require_order.rb +89 -0
- data/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb +83 -0
- data/lib/rubocop/cop/lint/number_conversion.rb +81 -0
- data/lib/rubocop/cop/lint/ordered_magic_comments.rb +86 -0
- data/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb +86 -0
- data/lib/rubocop/cop/lint/percent_string_array.rb +71 -0
- data/lib/rubocop/cop/lint/percent_symbol_array.rb +69 -0
- data/lib/rubocop/cop/lint/raise_exception.rb +75 -0
- data/lib/rubocop/cop/lint/rand_one.rb +45 -0
- data/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +258 -0
- data/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb +119 -0
- data/lib/rubocop/cop/lint/redundant_require_statement.rb +50 -0
- data/lib/rubocop/cop/lint/redundant_splat_expansion.rb +172 -0
- data/lib/rubocop/cop/lint/redundant_string_coercion.rb +59 -0
- data/lib/rubocop/cop/lint/redundant_with_index.rb +82 -0
- data/lib/rubocop/cop/lint/redundant_with_object.rb +83 -0
- data/lib/rubocop/cop/lint/regexp_as_condition.rb +29 -0
- data/lib/rubocop/cop/lint/require_parentheses.rb +66 -0
- data/lib/rubocop/cop/lint/rescue_exception.rb +46 -0
- data/lib/rubocop/cop/lint/rescue_type.rb +94 -0
- data/lib/rubocop/cop/lint/return_in_void_context.rb +74 -0
- data/lib/rubocop/cop/lint/safe_navigation_chain.rb +65 -0
- data/lib/rubocop/cop/lint/safe_navigation_consistency.rb +94 -0
- data/lib/rubocop/cop/lint/safe_navigation_with_empty.rb +38 -0
- data/lib/rubocop/cop/lint/script_permission.rb +70 -0
- data/lib/rubocop/cop/lint/send_with_mixin_argument.rb +91 -0
- data/lib/rubocop/cop/lint/shadowed_argument.rb +182 -0
- data/lib/rubocop/cop/lint/shadowed_exception.rb +178 -0
- data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +53 -0
- data/lib/rubocop/cop/lint/struct_new_override.rb +58 -0
- data/lib/rubocop/cop/lint/suppressed_exception.rb +92 -0
- data/lib/rubocop/cop/lint/syntax.rb +57 -0
- data/lib/rubocop/cop/lint/to_json.rb +41 -0
- data/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb +82 -0
- data/lib/rubocop/cop/lint/unified_integer.rb +43 -0
- data/lib/rubocop/cop/lint/unreachable_code.rb +99 -0
- data/lib/rubocop/cop/lint/unused_block_argument.rb +165 -0
- data/lib/rubocop/cop/lint/unused_method_argument.rb +112 -0
- data/lib/rubocop/cop/lint/uri_escape_unescape.rb +76 -0
- data/lib/rubocop/cop/lint/uri_regexp.rb +73 -0
- data/lib/rubocop/cop/lint/useless_access_modifier.rb +284 -0
- data/lib/rubocop/cop/lint/useless_assignment.rb +130 -0
- data/lib/rubocop/cop/lint/useless_comparison.rb +28 -0
- data/lib/rubocop/cop/lint/useless_else_without_rescue.rb +54 -0
- data/lib/rubocop/cop/lint/useless_setter_call.rb +168 -0
- data/lib/rubocop/cop/lint/void.rb +151 -0
- data/lib/rubocop/cop/message_annotator.rb +129 -0
- data/lib/rubocop/cop/metrics/abc_size.rb +24 -0
- data/lib/rubocop/cop/metrics/block_length.rb +50 -0
- data/lib/rubocop/cop/metrics/block_nesting.rb +65 -0
- data/lib/rubocop/cop/metrics/class_length.rb +36 -0
- data/lib/rubocop/cop/metrics/cyclomatic_complexity.rb +32 -0
- data/lib/rubocop/cop/metrics/method_length.rb +36 -0
- data/lib/rubocop/cop/metrics/module_length.rb +36 -0
- data/lib/rubocop/cop/metrics/parameter_lists.rb +54 -0
- data/lib/rubocop/cop/metrics/perceived_complexity.rb +61 -0
- data/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb +84 -0
- data/lib/rubocop/cop/migration/department_name.rb +85 -0
- data/lib/rubocop/cop/mixin/alignment.rb +72 -0
- data/lib/rubocop/cop/mixin/annotation_comment.rb +37 -0
- data/lib/rubocop/cop/mixin/array_min_size.rb +57 -0
- data/lib/rubocop/cop/mixin/array_syntax.rb +17 -0
- data/lib/rubocop/cop/mixin/check_assignment.rb +44 -0
- data/lib/rubocop/cop/mixin/check_line_breakable.rb +184 -0
- data/lib/rubocop/cop/mixin/classish_length.rb +37 -0
- data/lib/rubocop/cop/mixin/code_length.rb +38 -0
- data/lib/rubocop/cop/mixin/configurable_enforced_style.rb +100 -0
- data/lib/rubocop/cop/mixin/configurable_formatting.rb +45 -0
- data/lib/rubocop/cop/mixin/configurable_max.rb +23 -0
- data/lib/rubocop/cop/mixin/configurable_naming.rb +16 -0
- data/lib/rubocop/cop/mixin/configurable_numbering.rb +17 -0
- data/lib/rubocop/cop/mixin/def_node.rb +33 -0
- data/lib/rubocop/cop/mixin/documentation_comment.rb +52 -0
- data/lib/rubocop/cop/mixin/duplication.rb +46 -0
- data/lib/rubocop/cop/mixin/empty_lines_around_body.rb +172 -0
- data/lib/rubocop/cop/mixin/empty_parameter.rb +24 -0
- data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +72 -0
- data/lib/rubocop/cop/mixin/enforce_superclass.rb +30 -0
- data/lib/rubocop/cop/mixin/first_element_line_break.rb +46 -0
- data/lib/rubocop/cop/mixin/frozen_string_literal.rb +62 -0
- data/lib/rubocop/cop/mixin/hash_alignment_styles.rb +147 -0
- data/lib/rubocop/cop/mixin/hash_transform_method.rb +178 -0
- data/lib/rubocop/cop/mixin/heredoc.rb +32 -0
- data/lib/rubocop/cop/mixin/ignored_methods.rb +19 -0
- data/lib/rubocop/cop/mixin/ignored_pattern.rb +29 -0
- data/lib/rubocop/cop/mixin/integer_node.rb +14 -0
- data/lib/rubocop/cop/mixin/interpolation.rb +27 -0
- data/lib/rubocop/cop/mixin/line_length_help.rb +89 -0
- data/lib/rubocop/cop/mixin/match_range.rb +26 -0
- data/lib/rubocop/cop/mixin/method_complexity.rb +62 -0
- data/lib/rubocop/cop/mixin/method_preference.rb +31 -0
- data/lib/rubocop/cop/mixin/min_body_length.rb +21 -0
- data/lib/rubocop/cop/mixin/multiline_element_indentation.rb +86 -0
- data/lib/rubocop/cop/mixin/multiline_element_line_breaks.rb +33 -0
- data/lib/rubocop/cop/mixin/multiline_expression_indentation.rb +255 -0
- data/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb +141 -0
- data/lib/rubocop/cop/mixin/negative_conditional.rb +32 -0
- data/lib/rubocop/cop/mixin/nil_methods.rb +25 -0
- data/lib/rubocop/cop/mixin/on_normal_if_unless.rb +14 -0
- data/lib/rubocop/cop/mixin/ordered_gem_node.rb +56 -0
- data/lib/rubocop/cop/mixin/parentheses.rb +17 -0
- data/lib/rubocop/cop/mixin/parser_diagnostic.rb +37 -0
- data/lib/rubocop/cop/mixin/percent_array.rb +52 -0
- data/lib/rubocop/cop/mixin/percent_literal.rb +38 -0
- data/lib/rubocop/cop/mixin/preceding_following_alignment.rb +181 -0
- data/lib/rubocop/cop/mixin/preferred_delimiters.rb +53 -0
- data/lib/rubocop/cop/mixin/range_help.rb +117 -0
- data/lib/rubocop/cop/mixin/rational_literal.rb +18 -0
- data/lib/rubocop/cop/mixin/regexp_literal_help.rb +16 -0
- data/lib/rubocop/cop/mixin/rescue_node.rb +22 -0
- data/lib/rubocop/cop/mixin/safe_assignment.rb +23 -0
- data/lib/rubocop/cop/mixin/space_after_punctuation.rb +55 -0
- data/lib/rubocop/cop/mixin/space_before_punctuation.rb +49 -0
- data/lib/rubocop/cop/mixin/statement_modifier.rb +56 -0
- data/lib/rubocop/cop/mixin/string_help.rb +35 -0
- data/lib/rubocop/cop/mixin/string_literals_help.rb +23 -0
- data/lib/rubocop/cop/mixin/surrounding_space.rb +146 -0
- data/lib/rubocop/cop/mixin/target_ruby_version.rb +20 -0
- data/lib/rubocop/cop/mixin/too_many_lines.rb +35 -0
- data/lib/rubocop/cop/mixin/trailing_body.rb +26 -0
- data/lib/rubocop/cop/mixin/trailing_comma.rb +212 -0
- data/lib/rubocop/cop/mixin/uncommunicative_name.rb +111 -0
- data/lib/rubocop/cop/mixin/unused_argument.rb +33 -0
- data/lib/rubocop/cop/naming/accessor_method_name.rb +55 -0
- data/lib/rubocop/cop/naming/ascii_identifiers.rb +72 -0
- data/lib/rubocop/cop/naming/binary_operator_parameter_name.rb +43 -0
- data/lib/rubocop/cop/naming/block_parameter_name.rb +49 -0
- data/lib/rubocop/cop/naming/class_and_module_camel_case.rb +43 -0
- data/lib/rubocop/cop/naming/constant_name.rb +82 -0
- data/lib/rubocop/cop/naming/file_name.rb +225 -0
- data/lib/rubocop/cop/naming/heredoc_delimiter_case.rb +62 -0
- data/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb +55 -0
- data/lib/rubocop/cop/naming/memoized_instance_variable_name.rb +171 -0
- data/lib/rubocop/cop/naming/method_name.rb +79 -0
- data/lib/rubocop/cop/naming/method_parameter_name.rb +58 -0
- data/lib/rubocop/cop/naming/predicate_name.rb +108 -0
- data/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb +112 -0
- data/lib/rubocop/cop/naming/variable_name.rb +52 -0
- data/lib/rubocop/cop/naming/variable_number.rb +61 -0
- data/lib/rubocop/cop/offense.rb +216 -0
- data/lib/rubocop/cop/registry.rb +276 -0
- data/lib/rubocop/cop/security/eval.rb +31 -0
- data/lib/rubocop/cop/security/json_load.rb +46 -0
- data/lib/rubocop/cop/security/marshal_load.rb +39 -0
- data/lib/rubocop/cop/security/open.rb +71 -0
- data/lib/rubocop/cop/security/yaml_load.rb +37 -0
- data/lib/rubocop/cop/severity.rb +75 -0
- data/lib/rubocop/cop/style/access_modifier_declarations.rb +132 -0
- data/lib/rubocop/cop/style/alias.rb +147 -0
- data/lib/rubocop/cop/style/and_or.rb +145 -0
- data/lib/rubocop/cop/style/array_join.rb +39 -0
- data/lib/rubocop/cop/style/ascii_comments.rb +61 -0
- data/lib/rubocop/cop/style/attr.rb +68 -0
- data/lib/rubocop/cop/style/auto_resource_cleanup.rb +51 -0
- data/lib/rubocop/cop/style/bare_percent_literals.rb +78 -0
- data/lib/rubocop/cop/style/begin_block.rb +22 -0
- data/lib/rubocop/cop/style/block_comments.rb +70 -0
- data/lib/rubocop/cop/style/block_delimiters.rb +384 -0
- data/lib/rubocop/cop/style/case_equality.rb +53 -0
- data/lib/rubocop/cop/style/character_literal.rb +53 -0
- data/lib/rubocop/cop/style/class_and_module_children.rb +151 -0
- data/lib/rubocop/cop/style/class_check.rb +59 -0
- data/lib/rubocop/cop/style/class_methods.rb +60 -0
- data/lib/rubocop/cop/style/class_vars.rb +48 -0
- data/lib/rubocop/cop/style/collection_methods.rb +79 -0
- data/lib/rubocop/cop/style/colon_method_call.rb +48 -0
- data/lib/rubocop/cop/style/colon_method_definition.rb +37 -0
- data/lib/rubocop/cop/style/command_literal.rb +187 -0
- data/lib/rubocop/cop/style/comment_annotation.rb +97 -0
- data/lib/rubocop/cop/style/commented_keyword.rb +73 -0
- data/lib/rubocop/cop/style/conditional_assignment.rb +666 -0
- data/lib/rubocop/cop/style/constant_visibility.rb +77 -0
- data/lib/rubocop/cop/style/copyright.rb +99 -0
- data/lib/rubocop/cop/style/date_time.rb +77 -0
- data/lib/rubocop/cop/style/def_with_parentheses.rb +57 -0
- data/lib/rubocop/cop/style/dir.rb +48 -0
- data/lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb +49 -0
- data/lib/rubocop/cop/style/documentation.rb +135 -0
- data/lib/rubocop/cop/style/documentation_method.rb +125 -0
- data/lib/rubocop/cop/style/double_cop_disable_directive.rb +55 -0
- data/lib/rubocop/cop/style/double_negation.rb +72 -0
- data/lib/rubocop/cop/style/each_for_simple_loop.rb +58 -0
- data/lib/rubocop/cop/style/each_with_object.rb +110 -0
- data/lib/rubocop/cop/style/empty_block_parameter.rb +48 -0
- data/lib/rubocop/cop/style/empty_case_condition.rb +107 -0
- data/lib/rubocop/cop/style/empty_else.rb +175 -0
- data/lib/rubocop/cop/style/empty_lambda_parameter.rb +45 -0
- data/lib/rubocop/cop/style/empty_literal.rb +121 -0
- data/lib/rubocop/cop/style/empty_method.rb +111 -0
- data/lib/rubocop/cop/style/encoding.rb +56 -0
- data/lib/rubocop/cop/style/end_block.rb +31 -0
- data/lib/rubocop/cop/style/eval_with_location.rb +148 -0
- data/lib/rubocop/cop/style/even_odd.rb +58 -0
- data/lib/rubocop/cop/style/expand_path_arguments.rb +194 -0
- data/lib/rubocop/cop/style/exponential_notation.rb +119 -0
- data/lib/rubocop/cop/style/float_division.rb +94 -0
- data/lib/rubocop/cop/style/for.rb +88 -0
- data/lib/rubocop/cop/style/format_string.rb +127 -0
- data/lib/rubocop/cop/style/format_string_token.rb +120 -0
- data/lib/rubocop/cop/style/frozen_string_literal_comment.rb +234 -0
- data/lib/rubocop/cop/style/global_vars.rb +80 -0
- data/lib/rubocop/cop/style/guard_clause.rb +145 -0
- data/lib/rubocop/cop/style/hash_each_methods.rb +89 -0
- data/lib/rubocop/cop/style/hash_syntax.rb +221 -0
- data/lib/rubocop/cop/style/hash_transform_keys.rb +83 -0
- data/lib/rubocop/cop/style/hash_transform_values.rb +80 -0
- data/lib/rubocop/cop/style/identical_conditional_branches.rb +130 -0
- data/lib/rubocop/cop/style/if_inside_else.rb +87 -0
- data/lib/rubocop/cop/style/if_unless_modifier.rb +189 -0
- data/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb +39 -0
- data/lib/rubocop/cop/style/if_with_semicolon.rb +46 -0
- data/lib/rubocop/cop/style/implicit_runtime_error.rb +32 -0
- data/lib/rubocop/cop/style/infinite_loop.rb +128 -0
- data/lib/rubocop/cop/style/inline_comment.rb +34 -0
- data/lib/rubocop/cop/style/inverse_methods.rb +197 -0
- data/lib/rubocop/cop/style/ip_addresses.rb +76 -0
- data/lib/rubocop/cop/style/lambda.rb +132 -0
- data/lib/rubocop/cop/style/lambda_call.rb +73 -0
- data/lib/rubocop/cop/style/line_end_concatenation.rb +125 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +190 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +169 -0
- data/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb +52 -0
- data/lib/rubocop/cop/style/method_call_without_args_parentheses.rb +75 -0
- data/lib/rubocop/cop/style/method_called_on_do_end_block.rb +46 -0
- data/lib/rubocop/cop/style/method_def_parentheses.rb +166 -0
- data/lib/rubocop/cop/style/method_missing_super.rb +34 -0
- data/lib/rubocop/cop/style/min_max.rb +68 -0
- data/lib/rubocop/cop/style/missing_else.rb +180 -0
- data/lib/rubocop/cop/style/missing_respond_to_missing.rb +46 -0
- data/lib/rubocop/cop/style/mixin_grouping.rb +148 -0
- data/lib/rubocop/cop/style/mixin_usage.rb +90 -0
- data/lib/rubocop/cop/style/module_function.rb +150 -0
- data/lib/rubocop/cop/style/multiline_block_chain.rb +40 -0
- data/lib/rubocop/cop/style/multiline_if_modifier.rb +67 -0
- data/lib/rubocop/cop/style/multiline_if_then.rb +50 -0
- data/lib/rubocop/cop/style/multiline_memoization.rb +94 -0
- data/lib/rubocop/cop/style/multiline_method_signature.rb +61 -0
- data/lib/rubocop/cop/style/multiline_ternary_operator.rb +38 -0
- data/lib/rubocop/cop/style/multiline_when_then.rb +74 -0
- data/lib/rubocop/cop/style/multiple_comparison.rb +92 -0
- data/lib/rubocop/cop/style/mutable_constant.rb +172 -0
- data/lib/rubocop/cop/style/negated_if.rb +99 -0
- data/lib/rubocop/cop/style/negated_unless.rb +89 -0
- data/lib/rubocop/cop/style/negated_while.rb +48 -0
- data/lib/rubocop/cop/style/nested_modifier.rb +107 -0
- data/lib/rubocop/cop/style/nested_parenthesized_calls.rb +67 -0
- data/lib/rubocop/cop/style/nested_ternary_operator.rb +32 -0
- data/lib/rubocop/cop/style/next.rb +244 -0
- data/lib/rubocop/cop/style/nil_comparison.rb +75 -0
- data/lib/rubocop/cop/style/non_nil_check.rb +136 -0
- data/lib/rubocop/cop/style/not.rb +82 -0
- data/lib/rubocop/cop/style/numeric_literal_prefix.rb +124 -0
- data/lib/rubocop/cop/style/numeric_literals.rb +114 -0
- data/lib/rubocop/cop/style/numeric_predicate.rb +138 -0
- data/lib/rubocop/cop/style/one_line_conditional.rb +98 -0
- data/lib/rubocop/cop/style/option_hash.rb +55 -0
- data/lib/rubocop/cop/style/optional_arguments.rb +58 -0
- data/lib/rubocop/cop/style/or_assignment.rb +96 -0
- data/lib/rubocop/cop/style/parallel_assignment.rb +287 -0
- data/lib/rubocop/cop/style/parentheses_around_condition.rb +117 -0
- data/lib/rubocop/cop/style/percent_literal_delimiters.rb +127 -0
- data/lib/rubocop/cop/style/percent_q_literals.rb +73 -0
- data/lib/rubocop/cop/style/perl_backrefs.rb +38 -0
- data/lib/rubocop/cop/style/preferred_hash_methods.rb +75 -0
- data/lib/rubocop/cop/style/proc.rb +34 -0
- data/lib/rubocop/cop/style/raise_args.rb +145 -0
- data/lib/rubocop/cop/style/random_with_offset.rb +158 -0
- data/lib/rubocop/cop/style/redundant_begin.rb +91 -0
- data/lib/rubocop/cop/style/redundant_capital_w.rb +51 -0
- data/lib/rubocop/cop/style/redundant_condition.rb +124 -0
- data/lib/rubocop/cop/style/redundant_conditional.rb +97 -0
- data/lib/rubocop/cop/style/redundant_exception.rb +60 -0
- data/lib/rubocop/cop/style/redundant_freeze.rb +67 -0
- data/lib/rubocop/cop/style/redundant_interpolation.rb +98 -0
- data/lib/rubocop/cop/style/redundant_parentheses.rb +227 -0
- data/lib/rubocop/cop/style/redundant_percent_q.rb +112 -0
- data/lib/rubocop/cop/style/redundant_regexp_character_class.rb +89 -0
- data/lib/rubocop/cop/style/redundant_regexp_escape.rb +130 -0
- data/lib/rubocop/cop/style/redundant_return.rb +169 -0
- data/lib/rubocop/cop/style/redundant_self.rb +171 -0
- data/lib/rubocop/cop/style/redundant_sort.rb +165 -0
- data/lib/rubocop/cop/style/redundant_sort_by.rb +50 -0
- data/lib/rubocop/cop/style/regexp_literal.rb +228 -0
- data/lib/rubocop/cop/style/rescue_modifier.rb +73 -0
- data/lib/rubocop/cop/style/rescue_standard_error.rb +124 -0
- data/lib/rubocop/cop/style/return_nil.rb +89 -0
- data/lib/rubocop/cop/style/safe_navigation.rb +271 -0
- data/lib/rubocop/cop/style/sample.rb +144 -0
- data/lib/rubocop/cop/style/self_assignment.rb +97 -0
- data/lib/rubocop/cop/style/semicolon.rb +101 -0
- data/lib/rubocop/cop/style/send.rb +31 -0
- data/lib/rubocop/cop/style/signal_exception.rb +211 -0
- data/lib/rubocop/cop/style/single_line_block_params.rb +95 -0
- data/lib/rubocop/cop/style/single_line_methods.rb +83 -0
- data/lib/rubocop/cop/style/slicing_with_range.rb +39 -0
- data/lib/rubocop/cop/style/special_global_vars.rb +207 -0
- data/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +83 -0
- data/lib/rubocop/cop/style/stderr_puts.rb +61 -0
- data/lib/rubocop/cop/style/string_hash_keys.rb +50 -0
- data/lib/rubocop/cop/style/string_literals.rb +129 -0
- data/lib/rubocop/cop/style/string_literals_in_interpolation.rb +49 -0
- data/lib/rubocop/cop/style/string_methods.rb +46 -0
- data/lib/rubocop/cop/style/strip.rb +46 -0
- data/lib/rubocop/cop/style/struct_inheritance.rb +39 -0
- data/lib/rubocop/cop/style/symbol_array.rb +119 -0
- data/lib/rubocop/cop/style/symbol_literal.rb +32 -0
- data/lib/rubocop/cop/style/symbol_proc.rb +110 -0
- data/lib/rubocop/cop/style/ternary_parentheses.rb +220 -0
- data/lib/rubocop/cop/style/trailing_body_on_class.rb +43 -0
- data/lib/rubocop/cop/style/trailing_body_on_method_definition.rb +54 -0
- data/lib/rubocop/cop/style/trailing_body_on_module.rb +43 -0
- data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +109 -0
- data/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb +99 -0
- data/lib/rubocop/cop/style/trailing_comma_in_block_args.rb +88 -0
- data/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb +100 -0
- data/lib/rubocop/cop/style/trailing_method_end_statement.rb +91 -0
- data/lib/rubocop/cop/style/trailing_underscore_variable.rb +165 -0
- data/lib/rubocop/cop/style/trivial_accessors.rb +191 -0
- data/lib/rubocop/cop/style/unless_else.rb +55 -0
- data/lib/rubocop/cop/style/unpack_first.rb +61 -0
- data/lib/rubocop/cop/style/variable_interpolation.rb +48 -0
- data/lib/rubocop/cop/style/when_then.rb +37 -0
- data/lib/rubocop/cop/style/while_until_do.rb +59 -0
- data/lib/rubocop/cop/style/while_until_modifier.rb +61 -0
- data/lib/rubocop/cop/style/word_array.rb +102 -0
- data/lib/rubocop/cop/style/yoda_condition.rb +156 -0
- data/lib/rubocop/cop/style/zero_length_predicate.rb +117 -0
- data/lib/rubocop/cop/team.rb +240 -0
- data/lib/rubocop/cop/util.rb +151 -0
- data/lib/rubocop/cop/utils/format_string.rb +120 -0
- data/lib/rubocop/cop/variable_force.rb +463 -0
- data/lib/rubocop/cop/variable_force/assignment.rb +97 -0
- data/lib/rubocop/cop/variable_force/branch.rb +320 -0
- data/lib/rubocop/cop/variable_force/branchable.rb +23 -0
- data/lib/rubocop/cop/variable_force/reference.rb +49 -0
- data/lib/rubocop/cop/variable_force/scope.rb +110 -0
- data/lib/rubocop/cop/variable_force/variable.rb +114 -0
- data/lib/rubocop/cop/variable_force/variable_table.rb +129 -0
- data/lib/rubocop/core_ext/string.rb +23 -0
- data/lib/rubocop/error.rb +34 -0
- data/lib/rubocop/ext/processed_source.rb +18 -0
- data/lib/rubocop/file_finder.rb +42 -0
- data/lib/rubocop/formatter/auto_gen_config_formatter.rb +16 -0
- data/lib/rubocop/formatter/base_formatter.rb +119 -0
- data/lib/rubocop/formatter/clang_style_formatter.rb +57 -0
- data/lib/rubocop/formatter/colorizable.rb +41 -0
- data/lib/rubocop/formatter/disabled_config_formatter.rb +216 -0
- data/lib/rubocop/formatter/emacs_style_formatter.rb +37 -0
- data/lib/rubocop/formatter/file_list_formatter.rb +20 -0
- data/lib/rubocop/formatter/formatter_set.rb +104 -0
- data/lib/rubocop/formatter/fuubar_style_formatter.rb +80 -0
- data/lib/rubocop/formatter/html_formatter.rb +141 -0
- data/lib/rubocop/formatter/json_formatter.rb +81 -0
- data/lib/rubocop/formatter/junit_formatter.rb +84 -0
- data/lib/rubocop/formatter/offense_count_formatter.rb +74 -0
- data/lib/rubocop/formatter/pacman_formatter.rb +80 -0
- data/lib/rubocop/formatter/progress_formatter.rb +63 -0
- data/lib/rubocop/formatter/quiet_formatter.rb +13 -0
- data/lib/rubocop/formatter/simple_text_formatter.rb +138 -0
- data/lib/rubocop/formatter/tap_formatter.rb +82 -0
- data/lib/rubocop/formatter/text_util.rb +20 -0
- data/lib/rubocop/formatter/worst_offenders_formatter.rb +62 -0
- data/lib/rubocop/magic_comment.rb +214 -0
- data/lib/rubocop/name_similarity.rb +24 -0
- data/lib/rubocop/options.rb +481 -0
- data/lib/rubocop/path_util.rb +85 -0
- data/lib/rubocop/platform.rb +11 -0
- data/lib/rubocop/rake_task.rb +80 -0
- data/lib/rubocop/remote_config.rb +104 -0
- data/lib/rubocop/result_cache.rb +205 -0
- data/lib/rubocop/rspec/cop_helper.rb +71 -0
- data/lib/rubocop/rspec/expect_offense.rb +273 -0
- data/lib/rubocop/rspec/host_environment_simulation_helper.rb +28 -0
- data/lib/rubocop/rspec/shared_contexts.rb +129 -0
- data/lib/rubocop/rspec/support.rb +13 -0
- data/lib/rubocop/runner.rb +386 -0
- data/lib/rubocop/string_interpreter.rb +57 -0
- data/lib/rubocop/target_finder.rb +196 -0
- data/lib/rubocop/target_ruby.rb +154 -0
- data/lib/rubocop/version.rb +23 -0
- data/lib/rubocop/warning.rb +11 -0
- data/lib/rubocop/yaml_duplication_checker.rb +39 -0
- metadata +780 -0
@@ -0,0 +1,196 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'set'
|
4
|
+
|
5
|
+
module RuboCop
|
6
|
+
# This class finds target files to inspect by scanning the directory tree
|
7
|
+
# and picking ruby files.
|
8
|
+
class TargetFinder
|
9
|
+
def initialize(config_store, options = {})
|
10
|
+
@config_store = config_store
|
11
|
+
@options = options
|
12
|
+
end
|
13
|
+
|
14
|
+
def force_exclusion?
|
15
|
+
@options[:force_exclusion]
|
16
|
+
end
|
17
|
+
|
18
|
+
def debug?
|
19
|
+
@options[:debug]
|
20
|
+
end
|
21
|
+
|
22
|
+
def fail_fast?
|
23
|
+
@options[:fail_fast]
|
24
|
+
end
|
25
|
+
|
26
|
+
# Generate a list of target files by expanding globbing patterns
|
27
|
+
# (if any). If args is empty, recursively find all Ruby source
|
28
|
+
# files under the current directory
|
29
|
+
# @return [Array] array of file paths
|
30
|
+
def find(args, mode)
|
31
|
+
return target_files_in_dir if args.empty?
|
32
|
+
|
33
|
+
files = []
|
34
|
+
|
35
|
+
args.uniq.each do |arg|
|
36
|
+
files += if File.directory?(arg)
|
37
|
+
target_files_in_dir(arg.chomp(File::SEPARATOR))
|
38
|
+
else
|
39
|
+
process_explicit_path(arg, mode)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
files.map { |f| File.expand_path(f) }.uniq
|
44
|
+
end
|
45
|
+
|
46
|
+
# Finds all Ruby source files under the current or other supplied
|
47
|
+
# directory. A Ruby source file is defined as a file with the `.rb`
|
48
|
+
# extension or a file with no extension that has a ruby shebang line
|
49
|
+
# as its first line.
|
50
|
+
# It is possible to specify includes and excludes using the config file,
|
51
|
+
# so you can include other Ruby files like Rakefiles and gemspecs.
|
52
|
+
# @param base_dir Root directory under which to search for
|
53
|
+
# ruby source files
|
54
|
+
# @return [Array] Array of filenames
|
55
|
+
def target_files_in_dir(base_dir = Dir.pwd)
|
56
|
+
# Support Windows: Backslashes from command-line -> forward slashes
|
57
|
+
base_dir = base_dir.gsub(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
|
58
|
+
all_files = find_files(base_dir, File::FNM_DOTMATCH)
|
59
|
+
hidden_files = Set.new(all_files - find_files(base_dir, 0))
|
60
|
+
base_dir_config = @config_store.for(base_dir)
|
61
|
+
|
62
|
+
target_files = all_files.select do |file|
|
63
|
+
to_inspect?(file, hidden_files, base_dir_config)
|
64
|
+
end
|
65
|
+
|
66
|
+
target_files.sort_by!(&order)
|
67
|
+
end
|
68
|
+
|
69
|
+
def to_inspect?(file, hidden_files, base_dir_config)
|
70
|
+
return false if base_dir_config.file_to_exclude?(file)
|
71
|
+
return true if !hidden_files.include?(file) && ruby_file?(file)
|
72
|
+
|
73
|
+
base_dir_config.file_to_include?(file)
|
74
|
+
end
|
75
|
+
|
76
|
+
# Search for files recursively starting at the given base directory using
|
77
|
+
# the given flags that determine how the match is made. Excluded files will
|
78
|
+
# be removed later by the caller, but as an optimization find_files removes
|
79
|
+
# the top level directories that are excluded in configuration in the
|
80
|
+
# normal way (dir/**/*).
|
81
|
+
def find_files(base_dir, flags)
|
82
|
+
wanted_toplevel_dirs = toplevel_dirs(base_dir, flags) -
|
83
|
+
excluded_dirs(base_dir)
|
84
|
+
wanted_toplevel_dirs.map! { |dir| dir << '/**/*' }
|
85
|
+
|
86
|
+
pattern = if wanted_toplevel_dirs.empty?
|
87
|
+
# We need this special case to avoid creating the pattern
|
88
|
+
# /**/* which searches the entire file system.
|
89
|
+
["#{base_dir}/**/*"]
|
90
|
+
else
|
91
|
+
# Search the non-excluded top directories, but also add files
|
92
|
+
# on the top level, which would otherwise not be found.
|
93
|
+
wanted_toplevel_dirs.unshift("#{base_dir}/*")
|
94
|
+
end
|
95
|
+
Dir.glob(pattern, flags).select { |path| FileTest.file?(path) }
|
96
|
+
end
|
97
|
+
|
98
|
+
def toplevel_dirs(base_dir, flags)
|
99
|
+
Dir.glob(File.join(base_dir, '*'), flags).select do |dir|
|
100
|
+
File.directory?(dir) && !dir.end_with?('/.', '/..')
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def excluded_dirs(base_dir)
|
105
|
+
all_cops_config = @config_store.for(base_dir).for_all_cops
|
106
|
+
dir_tree_excludes = all_cops_config['Exclude'].select do |pattern|
|
107
|
+
pattern.is_a?(String) && pattern.end_with?('/**/*')
|
108
|
+
end
|
109
|
+
dir_tree_excludes.map { |pattern| pattern.sub(%r{/\*\*/\*$}, '') }
|
110
|
+
end
|
111
|
+
|
112
|
+
def ruby_extension?(file)
|
113
|
+
ruby_extensions.include?(File.extname(file))
|
114
|
+
end
|
115
|
+
|
116
|
+
def ruby_extensions
|
117
|
+
ext_patterns = all_cops_include.select do |pattern|
|
118
|
+
pattern.start_with?('**/*.')
|
119
|
+
end
|
120
|
+
ext_patterns.map { |pattern| pattern.sub('**/*', '') }
|
121
|
+
end
|
122
|
+
|
123
|
+
def ruby_filename?(file)
|
124
|
+
ruby_filenames.include?(File.basename(file))
|
125
|
+
end
|
126
|
+
|
127
|
+
def ruby_filenames
|
128
|
+
file_patterns = all_cops_include.reject do |pattern|
|
129
|
+
pattern.start_with?('**/*.')
|
130
|
+
end
|
131
|
+
file_patterns.map { |pattern| pattern.sub('**/', '') }
|
132
|
+
end
|
133
|
+
|
134
|
+
def all_cops_include
|
135
|
+
@config_store.for('.').for_all_cops['Include'].map(&:to_s)
|
136
|
+
end
|
137
|
+
|
138
|
+
def ruby_executable?(file)
|
139
|
+
return false unless File.extname(file).empty? && File.exist?(file)
|
140
|
+
|
141
|
+
first_line = File.open(file, &:readline)
|
142
|
+
!(first_line =~ /#!.*(#{ruby_interpreters(file).join('|')})/).nil?
|
143
|
+
rescue EOFError, ArgumentError => e
|
144
|
+
warn("Unprocessable file #{file}: #{e.class}, #{e.message}") if debug?
|
145
|
+
|
146
|
+
false
|
147
|
+
end
|
148
|
+
|
149
|
+
def ruby_interpreters(file)
|
150
|
+
@config_store.for(file).for_all_cops['RubyInterpreters']
|
151
|
+
end
|
152
|
+
|
153
|
+
def stdin?
|
154
|
+
@options.key?(:stdin)
|
155
|
+
end
|
156
|
+
|
157
|
+
def ruby_file?(file)
|
158
|
+
stdin? || ruby_extension?(file) || ruby_filename?(file) ||
|
159
|
+
ruby_executable?(file)
|
160
|
+
end
|
161
|
+
|
162
|
+
def configured_include?(file)
|
163
|
+
@config_store.for('.').file_to_include?(file)
|
164
|
+
end
|
165
|
+
|
166
|
+
def included_file?(file)
|
167
|
+
ruby_file?(file) || configured_include?(file)
|
168
|
+
end
|
169
|
+
|
170
|
+
def process_explicit_path(path, mode)
|
171
|
+
files = path.include?('*') ? Dir[path] : [path]
|
172
|
+
|
173
|
+
if mode == :only_recognized_file_types || force_exclusion?
|
174
|
+
files.select! { |file| included_file?(file) }
|
175
|
+
end
|
176
|
+
|
177
|
+
return files unless force_exclusion?
|
178
|
+
|
179
|
+
files.reject do |file|
|
180
|
+
config = @config_store.for(file)
|
181
|
+
config.file_to_exclude?(file)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
private
|
186
|
+
|
187
|
+
def order
|
188
|
+
if fail_fast?
|
189
|
+
# Most recently modified file first.
|
190
|
+
->(path) { -Integer(File.mtime(path)) }
|
191
|
+
else
|
192
|
+
:itself
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
@@ -0,0 +1,154 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
# The kind of Ruby that code inspected by RuboCop is written in.
|
5
|
+
class TargetRuby
|
6
|
+
KNOWN_RUBIES = [2.4, 2.5, 2.6, 2.7].freeze
|
7
|
+
DEFAULT_VERSION = KNOWN_RUBIES.first
|
8
|
+
|
9
|
+
OBSOLETE_RUBIES = {
|
10
|
+
1.9 => '0.50', 2.0 => '0.50', 2.1 => '0.58', 2.2 => '0.69', 2.3 => '0.81'
|
11
|
+
}.freeze
|
12
|
+
private_constant :KNOWN_RUBIES, :OBSOLETE_RUBIES
|
13
|
+
|
14
|
+
# A place where information about a target ruby version is found.
|
15
|
+
class Source
|
16
|
+
attr_reader :version, :name
|
17
|
+
|
18
|
+
def initialize(config)
|
19
|
+
@config = config
|
20
|
+
@version = find_version
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_s
|
24
|
+
name
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# The target ruby version may be configured in RuboCop's config.
|
29
|
+
class RuboCopConfig < Source
|
30
|
+
def name
|
31
|
+
"`TargetRubyVersion` parameter (in #{@config.smart_loaded_path})"
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def find_version
|
37
|
+
@config.for_all_cops['TargetRubyVersion']&.to_f
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# The target ruby version may be found in a .ruby-version file.
|
42
|
+
class RubyVersionFile < Source
|
43
|
+
FILENAME = '.ruby-version'
|
44
|
+
|
45
|
+
def name
|
46
|
+
"`#{FILENAME}`"
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def find_version
|
52
|
+
file = ruby_version_file
|
53
|
+
return unless file && File.file?(file)
|
54
|
+
|
55
|
+
# rubocop:disable Lint/MixedRegexpCaptureTypes
|
56
|
+
# `(ruby-)` is not a capture type.
|
57
|
+
File.read(file).match(/\A(ruby-)?(?<version>\d+\.\d+)/) do |md|
|
58
|
+
# rubocop:enable Lint/MixedRegexpCaptureTypes
|
59
|
+
md[:version].to_f
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def ruby_version_file
|
64
|
+
@ruby_version_file ||=
|
65
|
+
@config.find_file_upwards(FILENAME,
|
66
|
+
@config.base_dir_for_path_parameters)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# The lock file of Bundler may identify the target ruby version.
|
71
|
+
class BundlerLockFile < Source
|
72
|
+
def name
|
73
|
+
"`#{bundler_lock_file_path}`"
|
74
|
+
end
|
75
|
+
|
76
|
+
private
|
77
|
+
|
78
|
+
def find_version
|
79
|
+
lock_file_path = bundler_lock_file_path
|
80
|
+
return nil unless lock_file_path
|
81
|
+
|
82
|
+
in_ruby_section = false
|
83
|
+
File.foreach(lock_file_path) do |line|
|
84
|
+
# If ruby is in Gemfile.lock or gems.lock, there should be two lines
|
85
|
+
# towards the bottom of the file that look like:
|
86
|
+
# RUBY VERSION
|
87
|
+
# ruby W.X.YpZ
|
88
|
+
# We ultimately want to match the "ruby W.X.Y.pZ" line, but there's
|
89
|
+
# extra logic to make sure we only start looking once we've seen the
|
90
|
+
# "RUBY VERSION" line.
|
91
|
+
in_ruby_section ||= line.match(/^\s*RUBY\s*VERSION\s*$/)
|
92
|
+
next unless in_ruby_section
|
93
|
+
|
94
|
+
# We currently only allow this feature to work with MRI ruby. If
|
95
|
+
# jruby (or something else) is used by the project, it's lock file
|
96
|
+
# will have a line that looks like:
|
97
|
+
# RUBY VERSION
|
98
|
+
# ruby W.X.YpZ (jruby x.x.x.x)
|
99
|
+
# The regex won't match in this situation.
|
100
|
+
result = line.match(/^\s*ruby\s+(\d+\.\d+)[p.\d]*\s*$/)
|
101
|
+
return result.captures.first.to_f if result
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
def bundler_lock_file_path
|
106
|
+
@config.bundler_lock_file_path
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
# If all else fails, a default version will be picked.
|
111
|
+
class Default < Source
|
112
|
+
def name
|
113
|
+
'default'
|
114
|
+
end
|
115
|
+
|
116
|
+
private
|
117
|
+
|
118
|
+
def find_version
|
119
|
+
DEFAULT_VERSION
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.supported_versions
|
124
|
+
KNOWN_RUBIES
|
125
|
+
end
|
126
|
+
|
127
|
+
SOURCES = [RuboCopConfig, RubyVersionFile, BundlerLockFile, Default].freeze
|
128
|
+
private_constant :SOURCES
|
129
|
+
|
130
|
+
def initialize(config)
|
131
|
+
@config = config
|
132
|
+
end
|
133
|
+
|
134
|
+
def source
|
135
|
+
@source ||= SOURCES.each.lazy.map { |c| c.new(@config) }.detect(&:version)
|
136
|
+
end
|
137
|
+
|
138
|
+
def version
|
139
|
+
source.version
|
140
|
+
end
|
141
|
+
|
142
|
+
def supported?
|
143
|
+
KNOWN_RUBIES.include?(version)
|
144
|
+
end
|
145
|
+
|
146
|
+
def rubocop_version_with_support
|
147
|
+
if supported?
|
148
|
+
RuboCop::Version.version
|
149
|
+
else
|
150
|
+
OBSOLETE_RUBIES[version]
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
# This module holds the RuboCop version information.
|
5
|
+
module Version
|
6
|
+
STRING = '0.85.0'
|
7
|
+
|
8
|
+
MSG = '%<version>s (using Parser %<parser_version>s, '\
|
9
|
+
'rubocop-ast %<rubocop_ast_version>s, ' \
|
10
|
+
'running on %<ruby_engine>s %<ruby_version>s %<ruby_platform>s)'
|
11
|
+
|
12
|
+
def self.version(debug = false)
|
13
|
+
if debug
|
14
|
+
format(MSG, version: STRING, parser_version: Parser::VERSION,
|
15
|
+
rubocop_ast_version: RuboCop::AST::Version::STRING,
|
16
|
+
ruby_engine: RUBY_ENGINE, ruby_version: RUBY_VERSION,
|
17
|
+
ruby_platform: RUBY_PLATFORM)
|
18
|
+
else
|
19
|
+
STRING
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
# A Warning exception is different from an Offense with severity 'warning'
|
5
|
+
# When a Warning is raised, this means that RuboCop was unable to perform a
|
6
|
+
# requested operation (such as inspecting or correcting a source file) due to
|
7
|
+
# user error
|
8
|
+
# For example, a configuration value in .rubocop.yml might be malformed
|
9
|
+
class Warning < StandardError
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
# Find duplicated keys from YAML.
|
5
|
+
module YAMLDuplicationChecker
|
6
|
+
def self.check(yaml_string, filename, &on_duplicated)
|
7
|
+
# Ruby 2.6+
|
8
|
+
tree = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0')
|
9
|
+
# Specify filename to display helpful message when it raises
|
10
|
+
# an error.
|
11
|
+
YAML.parse(yaml_string, filename: filename)
|
12
|
+
else
|
13
|
+
YAML.parse(yaml_string, filename)
|
14
|
+
end
|
15
|
+
return unless tree
|
16
|
+
|
17
|
+
traverse(tree, &on_duplicated)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.traverse(tree, &on_duplicated)
|
21
|
+
case tree
|
22
|
+
when Psych::Nodes::Mapping
|
23
|
+
tree.children.each_slice(2).with_object([]) do |(key, value), keys|
|
24
|
+
exist = keys.find { |key2| key2.value == key.value }
|
25
|
+
on_duplicated.call(exist, key) if exist
|
26
|
+
keys << key
|
27
|
+
traverse(value, &on_duplicated)
|
28
|
+
end
|
29
|
+
else
|
30
|
+
children = tree.children
|
31
|
+
return unless children
|
32
|
+
|
33
|
+
children.each { |c| traverse(c, &on_duplicated) }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
private_class_method :traverse
|
38
|
+
end
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,780 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rbhint
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.5.rc1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Zee Spencer
|
8
|
+
- Bozhidar Batsov
|
9
|
+
- Jonas Arvidsson
|
10
|
+
- Yuji Nakayama
|
11
|
+
autorequire:
|
12
|
+
bindir: exe
|
13
|
+
cert_chain: []
|
14
|
+
date: 2020-06-07 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: parallel
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.10'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.10'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: parser
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.7.0.1
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 2.7.0.1
|
44
|
+
- !ruby/object:Gem::Dependency
|
45
|
+
name: rainbow
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 2.2.2
|
51
|
+
- - "<"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '4.0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 2.2.2
|
61
|
+
- - "<"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '4.0'
|
64
|
+
- !ruby/object:Gem::Dependency
|
65
|
+
name: regexp_parser
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '1.7'
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.7'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rexml
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: rubocop-ast
|
94
|
+
requirement: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.0.3
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 0.0.3
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
name: ruby-progressbar
|
108
|
+
requirement: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '1.7'
|
113
|
+
type: :runtime
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - "~>"
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '1.7'
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: unicode-display_width
|
122
|
+
requirement: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 1.4.0
|
127
|
+
- - "<"
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '2.0'
|
130
|
+
type: :runtime
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: 1.4.0
|
137
|
+
- - "<"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '2.0'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: bundler
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: 1.15.0
|
147
|
+
- - "<"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '3.0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: 1.15.0
|
157
|
+
- - "<"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.0'
|
160
|
+
description: |2
|
161
|
+
RbHint is a Ruby code style checking and code formatting tool.
|
162
|
+
It aims to encourage adoption of the community-driven Ruby Style Guide.
|
163
|
+
email: zee+rbhint@zinc.coop
|
164
|
+
executables:
|
165
|
+
- rbhint
|
166
|
+
extensions: []
|
167
|
+
extra_rdoc_files:
|
168
|
+
- LICENSE.txt
|
169
|
+
- README.md
|
170
|
+
files:
|
171
|
+
- LICENSE.txt
|
172
|
+
- README.md
|
173
|
+
- assets/logo.png
|
174
|
+
- assets/output.html.erb
|
175
|
+
- bin/console
|
176
|
+
- bin/setup
|
177
|
+
- config/default.yml
|
178
|
+
- exe/rbhint
|
179
|
+
- lib/rbhint.rb
|
180
|
+
- lib/rbhint/version.rb
|
181
|
+
- lib/rubocop.rb
|
182
|
+
- lib/rubocop/ast_aliases.rb
|
183
|
+
- lib/rubocop/cached_data.rb
|
184
|
+
- lib/rubocop/cli.rb
|
185
|
+
- lib/rubocop/cli/command.rb
|
186
|
+
- lib/rubocop/cli/command/auto_genenerate_config.rb
|
187
|
+
- lib/rubocop/cli/command/base.rb
|
188
|
+
- lib/rubocop/cli/command/execute_runner.rb
|
189
|
+
- lib/rubocop/cli/command/init_dotfile.rb
|
190
|
+
- lib/rubocop/cli/command/show_cops.rb
|
191
|
+
- lib/rubocop/cli/command/version.rb
|
192
|
+
- lib/rubocop/cli/environment.rb
|
193
|
+
- lib/rubocop/comment_config.rb
|
194
|
+
- lib/rubocop/config.rb
|
195
|
+
- lib/rubocop/config_loader.rb
|
196
|
+
- lib/rubocop/config_loader_resolver.rb
|
197
|
+
- lib/rubocop/config_obsoletion.rb
|
198
|
+
- lib/rubocop/config_store.rb
|
199
|
+
- lib/rubocop/config_validator.rb
|
200
|
+
- lib/rubocop/cop/autocorrect_logic.rb
|
201
|
+
- lib/rubocop/cop/badge.rb
|
202
|
+
- lib/rubocop/cop/bundler/duplicated_gem.rb
|
203
|
+
- lib/rubocop/cop/bundler/gem_comment.rb
|
204
|
+
- lib/rubocop/cop/bundler/insecure_protocol_source.rb
|
205
|
+
- lib/rubocop/cop/bundler/ordered_gems.rb
|
206
|
+
- lib/rubocop/cop/commissioner.rb
|
207
|
+
- lib/rubocop/cop/cop.rb
|
208
|
+
- lib/rubocop/cop/corrector.rb
|
209
|
+
- lib/rubocop/cop/correctors/alignment_corrector.rb
|
210
|
+
- lib/rubocop/cop/correctors/condition_corrector.rb
|
211
|
+
- lib/rubocop/cop/correctors/each_to_for_corrector.rb
|
212
|
+
- lib/rubocop/cop/correctors/empty_line_corrector.rb
|
213
|
+
- lib/rubocop/cop/correctors/for_to_each_corrector.rb
|
214
|
+
- lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb
|
215
|
+
- lib/rubocop/cop/correctors/line_break_corrector.rb
|
216
|
+
- lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb
|
217
|
+
- lib/rubocop/cop/correctors/ordered_gem_corrector.rb
|
218
|
+
- lib/rubocop/cop/correctors/parentheses_corrector.rb
|
219
|
+
- lib/rubocop/cop/correctors/percent_literal_corrector.rb
|
220
|
+
- lib/rubocop/cop/correctors/punctuation_corrector.rb
|
221
|
+
- lib/rubocop/cop/correctors/space_corrector.rb
|
222
|
+
- lib/rubocop/cop/correctors/string_literal_corrector.rb
|
223
|
+
- lib/rubocop/cop/correctors/unused_arg_corrector.rb
|
224
|
+
- lib/rubocop/cop/force.rb
|
225
|
+
- lib/rubocop/cop/gemspec/duplicated_assignment.rb
|
226
|
+
- lib/rubocop/cop/gemspec/ordered_dependencies.rb
|
227
|
+
- lib/rubocop/cop/gemspec/required_ruby_version.rb
|
228
|
+
- lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb
|
229
|
+
- lib/rubocop/cop/generator.rb
|
230
|
+
- lib/rubocop/cop/generator/configuration_injector.rb
|
231
|
+
- lib/rubocop/cop/generator/require_file_injector.rb
|
232
|
+
- lib/rubocop/cop/ignored_node.rb
|
233
|
+
- lib/rubocop/cop/internal_affairs.rb
|
234
|
+
- lib/rubocop/cop/internal_affairs/method_name_equal.rb
|
235
|
+
- lib/rubocop/cop/internal_affairs/node_destructuring.rb
|
236
|
+
- lib/rubocop/cop/internal_affairs/node_type_predicate.rb
|
237
|
+
- lib/rubocop/cop/internal_affairs/offense_location_keyword.rb
|
238
|
+
- lib/rubocop/cop/internal_affairs/redundant_location_argument.rb
|
239
|
+
- lib/rubocop/cop/internal_affairs/redundant_message_argument.rb
|
240
|
+
- lib/rubocop/cop/internal_affairs/useless_message_assertion.rb
|
241
|
+
- lib/rubocop/cop/layout/access_modifier_indentation.rb
|
242
|
+
- lib/rubocop/cop/layout/argument_alignment.rb
|
243
|
+
- lib/rubocop/cop/layout/array_alignment.rb
|
244
|
+
- lib/rubocop/cop/layout/assignment_indentation.rb
|
245
|
+
- lib/rubocop/cop/layout/block_alignment.rb
|
246
|
+
- lib/rubocop/cop/layout/block_end_newline.rb
|
247
|
+
- lib/rubocop/cop/layout/case_indentation.rb
|
248
|
+
- lib/rubocop/cop/layout/class_structure.rb
|
249
|
+
- lib/rubocop/cop/layout/closing_heredoc_indentation.rb
|
250
|
+
- lib/rubocop/cop/layout/closing_parenthesis_indentation.rb
|
251
|
+
- lib/rubocop/cop/layout/comment_indentation.rb
|
252
|
+
- lib/rubocop/cop/layout/condition_position.rb
|
253
|
+
- lib/rubocop/cop/layout/def_end_alignment.rb
|
254
|
+
- lib/rubocop/cop/layout/dot_position.rb
|
255
|
+
- lib/rubocop/cop/layout/else_alignment.rb
|
256
|
+
- lib/rubocop/cop/layout/empty_comment.rb
|
257
|
+
- lib/rubocop/cop/layout/empty_line_after_guard_clause.rb
|
258
|
+
- lib/rubocop/cop/layout/empty_line_after_magic_comment.rb
|
259
|
+
- lib/rubocop/cop/layout/empty_line_between_defs.rb
|
260
|
+
- lib/rubocop/cop/layout/empty_lines.rb
|
261
|
+
- lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb
|
262
|
+
- lib/rubocop/cop/layout/empty_lines_around_arguments.rb
|
263
|
+
- lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb
|
264
|
+
- lib/rubocop/cop/layout/empty_lines_around_begin_body.rb
|
265
|
+
- lib/rubocop/cop/layout/empty_lines_around_block_body.rb
|
266
|
+
- lib/rubocop/cop/layout/empty_lines_around_class_body.rb
|
267
|
+
- lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb
|
268
|
+
- lib/rubocop/cop/layout/empty_lines_around_method_body.rb
|
269
|
+
- lib/rubocop/cop/layout/empty_lines_around_module_body.rb
|
270
|
+
- lib/rubocop/cop/layout/end_alignment.rb
|
271
|
+
- lib/rubocop/cop/layout/end_of_line.rb
|
272
|
+
- lib/rubocop/cop/layout/extra_spacing.rb
|
273
|
+
- lib/rubocop/cop/layout/first_argument_indentation.rb
|
274
|
+
- lib/rubocop/cop/layout/first_array_element_indentation.rb
|
275
|
+
- lib/rubocop/cop/layout/first_array_element_line_break.rb
|
276
|
+
- lib/rubocop/cop/layout/first_hash_element_indentation.rb
|
277
|
+
- lib/rubocop/cop/layout/first_hash_element_line_break.rb
|
278
|
+
- lib/rubocop/cop/layout/first_method_argument_line_break.rb
|
279
|
+
- lib/rubocop/cop/layout/first_method_parameter_line_break.rb
|
280
|
+
- lib/rubocop/cop/layout/first_parameter_indentation.rb
|
281
|
+
- lib/rubocop/cop/layout/hash_alignment.rb
|
282
|
+
- lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb
|
283
|
+
- lib/rubocop/cop/layout/heredoc_indentation.rb
|
284
|
+
- lib/rubocop/cop/layout/indentation_consistency.rb
|
285
|
+
- lib/rubocop/cop/layout/indentation_style.rb
|
286
|
+
- lib/rubocop/cop/layout/indentation_width.rb
|
287
|
+
- lib/rubocop/cop/layout/initial_indentation.rb
|
288
|
+
- lib/rubocop/cop/layout/leading_comment_space.rb
|
289
|
+
- lib/rubocop/cop/layout/leading_empty_lines.rb
|
290
|
+
- lib/rubocop/cop/layout/line_length.rb
|
291
|
+
- lib/rubocop/cop/layout/multiline_array_brace_layout.rb
|
292
|
+
- lib/rubocop/cop/layout/multiline_array_line_breaks.rb
|
293
|
+
- lib/rubocop/cop/layout/multiline_assignment_layout.rb
|
294
|
+
- lib/rubocop/cop/layout/multiline_block_layout.rb
|
295
|
+
- lib/rubocop/cop/layout/multiline_hash_brace_layout.rb
|
296
|
+
- lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb
|
297
|
+
- lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb
|
298
|
+
- lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb
|
299
|
+
- lib/rubocop/cop/layout/multiline_method_call_indentation.rb
|
300
|
+
- lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb
|
301
|
+
- lib/rubocop/cop/layout/multiline_operation_indentation.rb
|
302
|
+
- lib/rubocop/cop/layout/parameter_alignment.rb
|
303
|
+
- lib/rubocop/cop/layout/rescue_ensure_alignment.rb
|
304
|
+
- lib/rubocop/cop/layout/space_after_colon.rb
|
305
|
+
- lib/rubocop/cop/layout/space_after_comma.rb
|
306
|
+
- lib/rubocop/cop/layout/space_after_method_name.rb
|
307
|
+
- lib/rubocop/cop/layout/space_after_not.rb
|
308
|
+
- lib/rubocop/cop/layout/space_after_semicolon.rb
|
309
|
+
- lib/rubocop/cop/layout/space_around_block_parameters.rb
|
310
|
+
- lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb
|
311
|
+
- lib/rubocop/cop/layout/space_around_keyword.rb
|
312
|
+
- lib/rubocop/cop/layout/space_around_method_call_operator.rb
|
313
|
+
- lib/rubocop/cop/layout/space_around_operators.rb
|
314
|
+
- lib/rubocop/cop/layout/space_before_block_braces.rb
|
315
|
+
- lib/rubocop/cop/layout/space_before_comma.rb
|
316
|
+
- lib/rubocop/cop/layout/space_before_comment.rb
|
317
|
+
- lib/rubocop/cop/layout/space_before_first_arg.rb
|
318
|
+
- lib/rubocop/cop/layout/space_before_semicolon.rb
|
319
|
+
- lib/rubocop/cop/layout/space_in_lambda_literal.rb
|
320
|
+
- lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb
|
321
|
+
- lib/rubocop/cop/layout/space_inside_array_percent_literal.rb
|
322
|
+
- lib/rubocop/cop/layout/space_inside_block_braces.rb
|
323
|
+
- lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb
|
324
|
+
- lib/rubocop/cop/layout/space_inside_parens.rb
|
325
|
+
- lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb
|
326
|
+
- lib/rubocop/cop/layout/space_inside_range_literal.rb
|
327
|
+
- lib/rubocop/cop/layout/space_inside_reference_brackets.rb
|
328
|
+
- lib/rubocop/cop/layout/space_inside_string_interpolation.rb
|
329
|
+
- lib/rubocop/cop/layout/trailing_empty_lines.rb
|
330
|
+
- lib/rubocop/cop/layout/trailing_whitespace.rb
|
331
|
+
- lib/rubocop/cop/lint/ambiguous_block_association.rb
|
332
|
+
- lib/rubocop/cop/lint/ambiguous_operator.rb
|
333
|
+
- lib/rubocop/cop/lint/ambiguous_regexp_literal.rb
|
334
|
+
- lib/rubocop/cop/lint/assignment_in_condition.rb
|
335
|
+
- lib/rubocop/cop/lint/big_decimal_new.rb
|
336
|
+
- lib/rubocop/cop/lint/boolean_symbol.rb
|
337
|
+
- lib/rubocop/cop/lint/circular_argument_reference.rb
|
338
|
+
- lib/rubocop/cop/lint/debugger.rb
|
339
|
+
- lib/rubocop/cop/lint/deprecated_class_methods.rb
|
340
|
+
- lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb
|
341
|
+
- lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb
|
342
|
+
- lib/rubocop/cop/lint/duplicate_case_condition.rb
|
343
|
+
- lib/rubocop/cop/lint/duplicate_hash_key.rb
|
344
|
+
- lib/rubocop/cop/lint/duplicate_methods.rb
|
345
|
+
- lib/rubocop/cop/lint/each_with_object_argument.rb
|
346
|
+
- lib/rubocop/cop/lint/else_layout.rb
|
347
|
+
- lib/rubocop/cop/lint/empty_ensure.rb
|
348
|
+
- lib/rubocop/cop/lint/empty_expression.rb
|
349
|
+
- lib/rubocop/cop/lint/empty_interpolation.rb
|
350
|
+
- lib/rubocop/cop/lint/empty_when.rb
|
351
|
+
- lib/rubocop/cop/lint/ensure_return.rb
|
352
|
+
- lib/rubocop/cop/lint/erb_new_arguments.rb
|
353
|
+
- lib/rubocop/cop/lint/flip_flop.rb
|
354
|
+
- lib/rubocop/cop/lint/float_out_of_range.rb
|
355
|
+
- lib/rubocop/cop/lint/format_parameter_mismatch.rb
|
356
|
+
- lib/rubocop/cop/lint/heredoc_method_call_position.rb
|
357
|
+
- lib/rubocop/cop/lint/implicit_string_concatenation.rb
|
358
|
+
- lib/rubocop/cop/lint/ineffective_access_modifier.rb
|
359
|
+
- lib/rubocop/cop/lint/inherit_exception.rb
|
360
|
+
- lib/rubocop/cop/lint/interpolation_check.rb
|
361
|
+
- lib/rubocop/cop/lint/literal_as_condition.rb
|
362
|
+
- lib/rubocop/cop/lint/literal_in_interpolation.rb
|
363
|
+
- lib/rubocop/cop/lint/loop.rb
|
364
|
+
- lib/rubocop/cop/lint/missing_cop_enable_directive.rb
|
365
|
+
- lib/rubocop/cop/lint/mixed_regexp_capture_types.rb
|
366
|
+
- lib/rubocop/cop/lint/multiple_comparison.rb
|
367
|
+
- lib/rubocop/cop/lint/nested_method_definition.rb
|
368
|
+
- lib/rubocop/cop/lint/nested_percent_literal.rb
|
369
|
+
- lib/rubocop/cop/lint/next_without_accumulator.rb
|
370
|
+
- lib/rubocop/cop/lint/non_deterministic_require_order.rb
|
371
|
+
- lib/rubocop/cop/lint/non_local_exit_from_iterator.rb
|
372
|
+
- lib/rubocop/cop/lint/number_conversion.rb
|
373
|
+
- lib/rubocop/cop/lint/ordered_magic_comments.rb
|
374
|
+
- lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb
|
375
|
+
- lib/rubocop/cop/lint/percent_string_array.rb
|
376
|
+
- lib/rubocop/cop/lint/percent_symbol_array.rb
|
377
|
+
- lib/rubocop/cop/lint/raise_exception.rb
|
378
|
+
- lib/rubocop/cop/lint/rand_one.rb
|
379
|
+
- lib/rubocop/cop/lint/redundant_cop_disable_directive.rb
|
380
|
+
- lib/rubocop/cop/lint/redundant_cop_enable_directive.rb
|
381
|
+
- lib/rubocop/cop/lint/redundant_require_statement.rb
|
382
|
+
- lib/rubocop/cop/lint/redundant_splat_expansion.rb
|
383
|
+
- lib/rubocop/cop/lint/redundant_string_coercion.rb
|
384
|
+
- lib/rubocop/cop/lint/redundant_with_index.rb
|
385
|
+
- lib/rubocop/cop/lint/redundant_with_object.rb
|
386
|
+
- lib/rubocop/cop/lint/regexp_as_condition.rb
|
387
|
+
- lib/rubocop/cop/lint/require_parentheses.rb
|
388
|
+
- lib/rubocop/cop/lint/rescue_exception.rb
|
389
|
+
- lib/rubocop/cop/lint/rescue_type.rb
|
390
|
+
- lib/rubocop/cop/lint/return_in_void_context.rb
|
391
|
+
- lib/rubocop/cop/lint/safe_navigation_chain.rb
|
392
|
+
- lib/rubocop/cop/lint/safe_navigation_consistency.rb
|
393
|
+
- lib/rubocop/cop/lint/safe_navigation_with_empty.rb
|
394
|
+
- lib/rubocop/cop/lint/script_permission.rb
|
395
|
+
- lib/rubocop/cop/lint/send_with_mixin_argument.rb
|
396
|
+
- lib/rubocop/cop/lint/shadowed_argument.rb
|
397
|
+
- lib/rubocop/cop/lint/shadowed_exception.rb
|
398
|
+
- lib/rubocop/cop/lint/shadowing_outer_local_variable.rb
|
399
|
+
- lib/rubocop/cop/lint/struct_new_override.rb
|
400
|
+
- lib/rubocop/cop/lint/suppressed_exception.rb
|
401
|
+
- lib/rubocop/cop/lint/syntax.rb
|
402
|
+
- lib/rubocop/cop/lint/to_json.rb
|
403
|
+
- lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb
|
404
|
+
- lib/rubocop/cop/lint/unified_integer.rb
|
405
|
+
- lib/rubocop/cop/lint/unreachable_code.rb
|
406
|
+
- lib/rubocop/cop/lint/unused_block_argument.rb
|
407
|
+
- lib/rubocop/cop/lint/unused_method_argument.rb
|
408
|
+
- lib/rubocop/cop/lint/uri_escape_unescape.rb
|
409
|
+
- lib/rubocop/cop/lint/uri_regexp.rb
|
410
|
+
- lib/rubocop/cop/lint/useless_access_modifier.rb
|
411
|
+
- lib/rubocop/cop/lint/useless_assignment.rb
|
412
|
+
- lib/rubocop/cop/lint/useless_comparison.rb
|
413
|
+
- lib/rubocop/cop/lint/useless_else_without_rescue.rb
|
414
|
+
- lib/rubocop/cop/lint/useless_setter_call.rb
|
415
|
+
- lib/rubocop/cop/lint/void.rb
|
416
|
+
- lib/rubocop/cop/message_annotator.rb
|
417
|
+
- lib/rubocop/cop/metrics/abc_size.rb
|
418
|
+
- lib/rubocop/cop/metrics/block_length.rb
|
419
|
+
- lib/rubocop/cop/metrics/block_nesting.rb
|
420
|
+
- lib/rubocop/cop/metrics/class_length.rb
|
421
|
+
- lib/rubocop/cop/metrics/cyclomatic_complexity.rb
|
422
|
+
- lib/rubocop/cop/metrics/method_length.rb
|
423
|
+
- lib/rubocop/cop/metrics/module_length.rb
|
424
|
+
- lib/rubocop/cop/metrics/parameter_lists.rb
|
425
|
+
- lib/rubocop/cop/metrics/perceived_complexity.rb
|
426
|
+
- lib/rubocop/cop/metrics/utils/abc_size_calculator.rb
|
427
|
+
- lib/rubocop/cop/migration/department_name.rb
|
428
|
+
- lib/rubocop/cop/mixin/alignment.rb
|
429
|
+
- lib/rubocop/cop/mixin/annotation_comment.rb
|
430
|
+
- lib/rubocop/cop/mixin/array_min_size.rb
|
431
|
+
- lib/rubocop/cop/mixin/array_syntax.rb
|
432
|
+
- lib/rubocop/cop/mixin/check_assignment.rb
|
433
|
+
- lib/rubocop/cop/mixin/check_line_breakable.rb
|
434
|
+
- lib/rubocop/cop/mixin/classish_length.rb
|
435
|
+
- lib/rubocop/cop/mixin/code_length.rb
|
436
|
+
- lib/rubocop/cop/mixin/configurable_enforced_style.rb
|
437
|
+
- lib/rubocop/cop/mixin/configurable_formatting.rb
|
438
|
+
- lib/rubocop/cop/mixin/configurable_max.rb
|
439
|
+
- lib/rubocop/cop/mixin/configurable_naming.rb
|
440
|
+
- lib/rubocop/cop/mixin/configurable_numbering.rb
|
441
|
+
- lib/rubocop/cop/mixin/def_node.rb
|
442
|
+
- lib/rubocop/cop/mixin/documentation_comment.rb
|
443
|
+
- lib/rubocop/cop/mixin/duplication.rb
|
444
|
+
- lib/rubocop/cop/mixin/empty_lines_around_body.rb
|
445
|
+
- lib/rubocop/cop/mixin/empty_parameter.rb
|
446
|
+
- lib/rubocop/cop/mixin/end_keyword_alignment.rb
|
447
|
+
- lib/rubocop/cop/mixin/enforce_superclass.rb
|
448
|
+
- lib/rubocop/cop/mixin/first_element_line_break.rb
|
449
|
+
- lib/rubocop/cop/mixin/frozen_string_literal.rb
|
450
|
+
- lib/rubocop/cop/mixin/hash_alignment_styles.rb
|
451
|
+
- lib/rubocop/cop/mixin/hash_transform_method.rb
|
452
|
+
- lib/rubocop/cop/mixin/heredoc.rb
|
453
|
+
- lib/rubocop/cop/mixin/ignored_methods.rb
|
454
|
+
- lib/rubocop/cop/mixin/ignored_pattern.rb
|
455
|
+
- lib/rubocop/cop/mixin/integer_node.rb
|
456
|
+
- lib/rubocop/cop/mixin/interpolation.rb
|
457
|
+
- lib/rubocop/cop/mixin/line_length_help.rb
|
458
|
+
- lib/rubocop/cop/mixin/match_range.rb
|
459
|
+
- lib/rubocop/cop/mixin/method_complexity.rb
|
460
|
+
- lib/rubocop/cop/mixin/method_preference.rb
|
461
|
+
- lib/rubocop/cop/mixin/min_body_length.rb
|
462
|
+
- lib/rubocop/cop/mixin/multiline_element_indentation.rb
|
463
|
+
- lib/rubocop/cop/mixin/multiline_element_line_breaks.rb
|
464
|
+
- lib/rubocop/cop/mixin/multiline_expression_indentation.rb
|
465
|
+
- lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb
|
466
|
+
- lib/rubocop/cop/mixin/negative_conditional.rb
|
467
|
+
- lib/rubocop/cop/mixin/nil_methods.rb
|
468
|
+
- lib/rubocop/cop/mixin/on_normal_if_unless.rb
|
469
|
+
- lib/rubocop/cop/mixin/ordered_gem_node.rb
|
470
|
+
- lib/rubocop/cop/mixin/parentheses.rb
|
471
|
+
- lib/rubocop/cop/mixin/parser_diagnostic.rb
|
472
|
+
- lib/rubocop/cop/mixin/percent_array.rb
|
473
|
+
- lib/rubocop/cop/mixin/percent_literal.rb
|
474
|
+
- lib/rubocop/cop/mixin/preceding_following_alignment.rb
|
475
|
+
- lib/rubocop/cop/mixin/preferred_delimiters.rb
|
476
|
+
- lib/rubocop/cop/mixin/range_help.rb
|
477
|
+
- lib/rubocop/cop/mixin/rational_literal.rb
|
478
|
+
- lib/rubocop/cop/mixin/regexp_literal_help.rb
|
479
|
+
- lib/rubocop/cop/mixin/rescue_node.rb
|
480
|
+
- lib/rubocop/cop/mixin/safe_assignment.rb
|
481
|
+
- lib/rubocop/cop/mixin/space_after_punctuation.rb
|
482
|
+
- lib/rubocop/cop/mixin/space_before_punctuation.rb
|
483
|
+
- lib/rubocop/cop/mixin/statement_modifier.rb
|
484
|
+
- lib/rubocop/cop/mixin/string_help.rb
|
485
|
+
- lib/rubocop/cop/mixin/string_literals_help.rb
|
486
|
+
- lib/rubocop/cop/mixin/surrounding_space.rb
|
487
|
+
- lib/rubocop/cop/mixin/target_ruby_version.rb
|
488
|
+
- lib/rubocop/cop/mixin/too_many_lines.rb
|
489
|
+
- lib/rubocop/cop/mixin/trailing_body.rb
|
490
|
+
- lib/rubocop/cop/mixin/trailing_comma.rb
|
491
|
+
- lib/rubocop/cop/mixin/uncommunicative_name.rb
|
492
|
+
- lib/rubocop/cop/mixin/unused_argument.rb
|
493
|
+
- lib/rubocop/cop/naming/accessor_method_name.rb
|
494
|
+
- lib/rubocop/cop/naming/ascii_identifiers.rb
|
495
|
+
- lib/rubocop/cop/naming/binary_operator_parameter_name.rb
|
496
|
+
- lib/rubocop/cop/naming/block_parameter_name.rb
|
497
|
+
- lib/rubocop/cop/naming/class_and_module_camel_case.rb
|
498
|
+
- lib/rubocop/cop/naming/constant_name.rb
|
499
|
+
- lib/rubocop/cop/naming/file_name.rb
|
500
|
+
- lib/rubocop/cop/naming/heredoc_delimiter_case.rb
|
501
|
+
- lib/rubocop/cop/naming/heredoc_delimiter_naming.rb
|
502
|
+
- lib/rubocop/cop/naming/memoized_instance_variable_name.rb
|
503
|
+
- lib/rubocop/cop/naming/method_name.rb
|
504
|
+
- lib/rubocop/cop/naming/method_parameter_name.rb
|
505
|
+
- lib/rubocop/cop/naming/predicate_name.rb
|
506
|
+
- lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb
|
507
|
+
- lib/rubocop/cop/naming/variable_name.rb
|
508
|
+
- lib/rubocop/cop/naming/variable_number.rb
|
509
|
+
- lib/rubocop/cop/offense.rb
|
510
|
+
- lib/rubocop/cop/registry.rb
|
511
|
+
- lib/rubocop/cop/security/eval.rb
|
512
|
+
- lib/rubocop/cop/security/json_load.rb
|
513
|
+
- lib/rubocop/cop/security/marshal_load.rb
|
514
|
+
- lib/rubocop/cop/security/open.rb
|
515
|
+
- lib/rubocop/cop/security/yaml_load.rb
|
516
|
+
- lib/rubocop/cop/severity.rb
|
517
|
+
- lib/rubocop/cop/style/access_modifier_declarations.rb
|
518
|
+
- lib/rubocop/cop/style/alias.rb
|
519
|
+
- lib/rubocop/cop/style/and_or.rb
|
520
|
+
- lib/rubocop/cop/style/array_join.rb
|
521
|
+
- lib/rubocop/cop/style/ascii_comments.rb
|
522
|
+
- lib/rubocop/cop/style/attr.rb
|
523
|
+
- lib/rubocop/cop/style/auto_resource_cleanup.rb
|
524
|
+
- lib/rubocop/cop/style/bare_percent_literals.rb
|
525
|
+
- lib/rubocop/cop/style/begin_block.rb
|
526
|
+
- lib/rubocop/cop/style/block_comments.rb
|
527
|
+
- lib/rubocop/cop/style/block_delimiters.rb
|
528
|
+
- lib/rubocop/cop/style/case_equality.rb
|
529
|
+
- lib/rubocop/cop/style/character_literal.rb
|
530
|
+
- lib/rubocop/cop/style/class_and_module_children.rb
|
531
|
+
- lib/rubocop/cop/style/class_check.rb
|
532
|
+
- lib/rubocop/cop/style/class_methods.rb
|
533
|
+
- lib/rubocop/cop/style/class_vars.rb
|
534
|
+
- lib/rubocop/cop/style/collection_methods.rb
|
535
|
+
- lib/rubocop/cop/style/colon_method_call.rb
|
536
|
+
- lib/rubocop/cop/style/colon_method_definition.rb
|
537
|
+
- lib/rubocop/cop/style/command_literal.rb
|
538
|
+
- lib/rubocop/cop/style/comment_annotation.rb
|
539
|
+
- lib/rubocop/cop/style/commented_keyword.rb
|
540
|
+
- lib/rubocop/cop/style/conditional_assignment.rb
|
541
|
+
- lib/rubocop/cop/style/constant_visibility.rb
|
542
|
+
- lib/rubocop/cop/style/copyright.rb
|
543
|
+
- lib/rubocop/cop/style/date_time.rb
|
544
|
+
- lib/rubocop/cop/style/def_with_parentheses.rb
|
545
|
+
- lib/rubocop/cop/style/dir.rb
|
546
|
+
- lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb
|
547
|
+
- lib/rubocop/cop/style/documentation.rb
|
548
|
+
- lib/rubocop/cop/style/documentation_method.rb
|
549
|
+
- lib/rubocop/cop/style/double_cop_disable_directive.rb
|
550
|
+
- lib/rubocop/cop/style/double_negation.rb
|
551
|
+
- lib/rubocop/cop/style/each_for_simple_loop.rb
|
552
|
+
- lib/rubocop/cop/style/each_with_object.rb
|
553
|
+
- lib/rubocop/cop/style/empty_block_parameter.rb
|
554
|
+
- lib/rubocop/cop/style/empty_case_condition.rb
|
555
|
+
- lib/rubocop/cop/style/empty_else.rb
|
556
|
+
- lib/rubocop/cop/style/empty_lambda_parameter.rb
|
557
|
+
- lib/rubocop/cop/style/empty_literal.rb
|
558
|
+
- lib/rubocop/cop/style/empty_method.rb
|
559
|
+
- lib/rubocop/cop/style/encoding.rb
|
560
|
+
- lib/rubocop/cop/style/end_block.rb
|
561
|
+
- lib/rubocop/cop/style/eval_with_location.rb
|
562
|
+
- lib/rubocop/cop/style/even_odd.rb
|
563
|
+
- lib/rubocop/cop/style/expand_path_arguments.rb
|
564
|
+
- lib/rubocop/cop/style/exponential_notation.rb
|
565
|
+
- lib/rubocop/cop/style/float_division.rb
|
566
|
+
- lib/rubocop/cop/style/for.rb
|
567
|
+
- lib/rubocop/cop/style/format_string.rb
|
568
|
+
- lib/rubocop/cop/style/format_string_token.rb
|
569
|
+
- lib/rubocop/cop/style/frozen_string_literal_comment.rb
|
570
|
+
- lib/rubocop/cop/style/global_vars.rb
|
571
|
+
- lib/rubocop/cop/style/guard_clause.rb
|
572
|
+
- lib/rubocop/cop/style/hash_each_methods.rb
|
573
|
+
- lib/rubocop/cop/style/hash_syntax.rb
|
574
|
+
- lib/rubocop/cop/style/hash_transform_keys.rb
|
575
|
+
- lib/rubocop/cop/style/hash_transform_values.rb
|
576
|
+
- lib/rubocop/cop/style/identical_conditional_branches.rb
|
577
|
+
- lib/rubocop/cop/style/if_inside_else.rb
|
578
|
+
- lib/rubocop/cop/style/if_unless_modifier.rb
|
579
|
+
- lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb
|
580
|
+
- lib/rubocop/cop/style/if_with_semicolon.rb
|
581
|
+
- lib/rubocop/cop/style/implicit_runtime_error.rb
|
582
|
+
- lib/rubocop/cop/style/infinite_loop.rb
|
583
|
+
- lib/rubocop/cop/style/inline_comment.rb
|
584
|
+
- lib/rubocop/cop/style/inverse_methods.rb
|
585
|
+
- lib/rubocop/cop/style/ip_addresses.rb
|
586
|
+
- lib/rubocop/cop/style/lambda.rb
|
587
|
+
- lib/rubocop/cop/style/lambda_call.rb
|
588
|
+
- lib/rubocop/cop/style/line_end_concatenation.rb
|
589
|
+
- lib/rubocop/cop/style/method_call_with_args_parentheses.rb
|
590
|
+
- lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb
|
591
|
+
- lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb
|
592
|
+
- lib/rubocop/cop/style/method_call_without_args_parentheses.rb
|
593
|
+
- lib/rubocop/cop/style/method_called_on_do_end_block.rb
|
594
|
+
- lib/rubocop/cop/style/method_def_parentheses.rb
|
595
|
+
- lib/rubocop/cop/style/method_missing_super.rb
|
596
|
+
- lib/rubocop/cop/style/min_max.rb
|
597
|
+
- lib/rubocop/cop/style/missing_else.rb
|
598
|
+
- lib/rubocop/cop/style/missing_respond_to_missing.rb
|
599
|
+
- lib/rubocop/cop/style/mixin_grouping.rb
|
600
|
+
- lib/rubocop/cop/style/mixin_usage.rb
|
601
|
+
- lib/rubocop/cop/style/module_function.rb
|
602
|
+
- lib/rubocop/cop/style/multiline_block_chain.rb
|
603
|
+
- lib/rubocop/cop/style/multiline_if_modifier.rb
|
604
|
+
- lib/rubocop/cop/style/multiline_if_then.rb
|
605
|
+
- lib/rubocop/cop/style/multiline_memoization.rb
|
606
|
+
- lib/rubocop/cop/style/multiline_method_signature.rb
|
607
|
+
- lib/rubocop/cop/style/multiline_ternary_operator.rb
|
608
|
+
- lib/rubocop/cop/style/multiline_when_then.rb
|
609
|
+
- lib/rubocop/cop/style/multiple_comparison.rb
|
610
|
+
- lib/rubocop/cop/style/mutable_constant.rb
|
611
|
+
- lib/rubocop/cop/style/negated_if.rb
|
612
|
+
- lib/rubocop/cop/style/negated_unless.rb
|
613
|
+
- lib/rubocop/cop/style/negated_while.rb
|
614
|
+
- lib/rubocop/cop/style/nested_modifier.rb
|
615
|
+
- lib/rubocop/cop/style/nested_parenthesized_calls.rb
|
616
|
+
- lib/rubocop/cop/style/nested_ternary_operator.rb
|
617
|
+
- lib/rubocop/cop/style/next.rb
|
618
|
+
- lib/rubocop/cop/style/nil_comparison.rb
|
619
|
+
- lib/rubocop/cop/style/non_nil_check.rb
|
620
|
+
- lib/rubocop/cop/style/not.rb
|
621
|
+
- lib/rubocop/cop/style/numeric_literal_prefix.rb
|
622
|
+
- lib/rubocop/cop/style/numeric_literals.rb
|
623
|
+
- lib/rubocop/cop/style/numeric_predicate.rb
|
624
|
+
- lib/rubocop/cop/style/one_line_conditional.rb
|
625
|
+
- lib/rubocop/cop/style/option_hash.rb
|
626
|
+
- lib/rubocop/cop/style/optional_arguments.rb
|
627
|
+
- lib/rubocop/cop/style/or_assignment.rb
|
628
|
+
- lib/rubocop/cop/style/parallel_assignment.rb
|
629
|
+
- lib/rubocop/cop/style/parentheses_around_condition.rb
|
630
|
+
- lib/rubocop/cop/style/percent_literal_delimiters.rb
|
631
|
+
- lib/rubocop/cop/style/percent_q_literals.rb
|
632
|
+
- lib/rubocop/cop/style/perl_backrefs.rb
|
633
|
+
- lib/rubocop/cop/style/preferred_hash_methods.rb
|
634
|
+
- lib/rubocop/cop/style/proc.rb
|
635
|
+
- lib/rubocop/cop/style/raise_args.rb
|
636
|
+
- lib/rubocop/cop/style/random_with_offset.rb
|
637
|
+
- lib/rubocop/cop/style/redundant_begin.rb
|
638
|
+
- lib/rubocop/cop/style/redundant_capital_w.rb
|
639
|
+
- lib/rubocop/cop/style/redundant_condition.rb
|
640
|
+
- lib/rubocop/cop/style/redundant_conditional.rb
|
641
|
+
- lib/rubocop/cop/style/redundant_exception.rb
|
642
|
+
- lib/rubocop/cop/style/redundant_freeze.rb
|
643
|
+
- lib/rubocop/cop/style/redundant_interpolation.rb
|
644
|
+
- lib/rubocop/cop/style/redundant_parentheses.rb
|
645
|
+
- lib/rubocop/cop/style/redundant_percent_q.rb
|
646
|
+
- lib/rubocop/cop/style/redundant_regexp_character_class.rb
|
647
|
+
- lib/rubocop/cop/style/redundant_regexp_escape.rb
|
648
|
+
- lib/rubocop/cop/style/redundant_return.rb
|
649
|
+
- lib/rubocop/cop/style/redundant_self.rb
|
650
|
+
- lib/rubocop/cop/style/redundant_sort.rb
|
651
|
+
- lib/rubocop/cop/style/redundant_sort_by.rb
|
652
|
+
- lib/rubocop/cop/style/regexp_literal.rb
|
653
|
+
- lib/rubocop/cop/style/rescue_modifier.rb
|
654
|
+
- lib/rubocop/cop/style/rescue_standard_error.rb
|
655
|
+
- lib/rubocop/cop/style/return_nil.rb
|
656
|
+
- lib/rubocop/cop/style/safe_navigation.rb
|
657
|
+
- lib/rubocop/cop/style/sample.rb
|
658
|
+
- lib/rubocop/cop/style/self_assignment.rb
|
659
|
+
- lib/rubocop/cop/style/semicolon.rb
|
660
|
+
- lib/rubocop/cop/style/send.rb
|
661
|
+
- lib/rubocop/cop/style/signal_exception.rb
|
662
|
+
- lib/rubocop/cop/style/single_line_block_params.rb
|
663
|
+
- lib/rubocop/cop/style/single_line_methods.rb
|
664
|
+
- lib/rubocop/cop/style/slicing_with_range.rb
|
665
|
+
- lib/rubocop/cop/style/special_global_vars.rb
|
666
|
+
- lib/rubocop/cop/style/stabby_lambda_parentheses.rb
|
667
|
+
- lib/rubocop/cop/style/stderr_puts.rb
|
668
|
+
- lib/rubocop/cop/style/string_hash_keys.rb
|
669
|
+
- lib/rubocop/cop/style/string_literals.rb
|
670
|
+
- lib/rubocop/cop/style/string_literals_in_interpolation.rb
|
671
|
+
- lib/rubocop/cop/style/string_methods.rb
|
672
|
+
- lib/rubocop/cop/style/strip.rb
|
673
|
+
- lib/rubocop/cop/style/struct_inheritance.rb
|
674
|
+
- lib/rubocop/cop/style/symbol_array.rb
|
675
|
+
- lib/rubocop/cop/style/symbol_literal.rb
|
676
|
+
- lib/rubocop/cop/style/symbol_proc.rb
|
677
|
+
- lib/rubocop/cop/style/ternary_parentheses.rb
|
678
|
+
- lib/rubocop/cop/style/trailing_body_on_class.rb
|
679
|
+
- lib/rubocop/cop/style/trailing_body_on_method_definition.rb
|
680
|
+
- lib/rubocop/cop/style/trailing_body_on_module.rb
|
681
|
+
- lib/rubocop/cop/style/trailing_comma_in_arguments.rb
|
682
|
+
- lib/rubocop/cop/style/trailing_comma_in_array_literal.rb
|
683
|
+
- lib/rubocop/cop/style/trailing_comma_in_block_args.rb
|
684
|
+
- lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb
|
685
|
+
- lib/rubocop/cop/style/trailing_method_end_statement.rb
|
686
|
+
- lib/rubocop/cop/style/trailing_underscore_variable.rb
|
687
|
+
- lib/rubocop/cop/style/trivial_accessors.rb
|
688
|
+
- lib/rubocop/cop/style/unless_else.rb
|
689
|
+
- lib/rubocop/cop/style/unpack_first.rb
|
690
|
+
- lib/rubocop/cop/style/variable_interpolation.rb
|
691
|
+
- lib/rubocop/cop/style/when_then.rb
|
692
|
+
- lib/rubocop/cop/style/while_until_do.rb
|
693
|
+
- lib/rubocop/cop/style/while_until_modifier.rb
|
694
|
+
- lib/rubocop/cop/style/word_array.rb
|
695
|
+
- lib/rubocop/cop/style/yoda_condition.rb
|
696
|
+
- lib/rubocop/cop/style/zero_length_predicate.rb
|
697
|
+
- lib/rubocop/cop/team.rb
|
698
|
+
- lib/rubocop/cop/util.rb
|
699
|
+
- lib/rubocop/cop/utils/format_string.rb
|
700
|
+
- lib/rubocop/cop/variable_force.rb
|
701
|
+
- lib/rubocop/cop/variable_force/assignment.rb
|
702
|
+
- lib/rubocop/cop/variable_force/branch.rb
|
703
|
+
- lib/rubocop/cop/variable_force/branchable.rb
|
704
|
+
- lib/rubocop/cop/variable_force/reference.rb
|
705
|
+
- lib/rubocop/cop/variable_force/scope.rb
|
706
|
+
- lib/rubocop/cop/variable_force/variable.rb
|
707
|
+
- lib/rubocop/cop/variable_force/variable_table.rb
|
708
|
+
- lib/rubocop/core_ext/string.rb
|
709
|
+
- lib/rubocop/error.rb
|
710
|
+
- lib/rubocop/ext/processed_source.rb
|
711
|
+
- lib/rubocop/file_finder.rb
|
712
|
+
- lib/rubocop/formatter/auto_gen_config_formatter.rb
|
713
|
+
- lib/rubocop/formatter/base_formatter.rb
|
714
|
+
- lib/rubocop/formatter/clang_style_formatter.rb
|
715
|
+
- lib/rubocop/formatter/colorizable.rb
|
716
|
+
- lib/rubocop/formatter/disabled_config_formatter.rb
|
717
|
+
- lib/rubocop/formatter/emacs_style_formatter.rb
|
718
|
+
- lib/rubocop/formatter/file_list_formatter.rb
|
719
|
+
- lib/rubocop/formatter/formatter_set.rb
|
720
|
+
- lib/rubocop/formatter/fuubar_style_formatter.rb
|
721
|
+
- lib/rubocop/formatter/html_formatter.rb
|
722
|
+
- lib/rubocop/formatter/json_formatter.rb
|
723
|
+
- lib/rubocop/formatter/junit_formatter.rb
|
724
|
+
- lib/rubocop/formatter/offense_count_formatter.rb
|
725
|
+
- lib/rubocop/formatter/pacman_formatter.rb
|
726
|
+
- lib/rubocop/formatter/progress_formatter.rb
|
727
|
+
- lib/rubocop/formatter/quiet_formatter.rb
|
728
|
+
- lib/rubocop/formatter/simple_text_formatter.rb
|
729
|
+
- lib/rubocop/formatter/tap_formatter.rb
|
730
|
+
- lib/rubocop/formatter/text_util.rb
|
731
|
+
- lib/rubocop/formatter/worst_offenders_formatter.rb
|
732
|
+
- lib/rubocop/magic_comment.rb
|
733
|
+
- lib/rubocop/name_similarity.rb
|
734
|
+
- lib/rubocop/options.rb
|
735
|
+
- lib/rubocop/path_util.rb
|
736
|
+
- lib/rubocop/platform.rb
|
737
|
+
- lib/rubocop/rake_task.rb
|
738
|
+
- lib/rubocop/remote_config.rb
|
739
|
+
- lib/rubocop/result_cache.rb
|
740
|
+
- lib/rubocop/rspec/cop_helper.rb
|
741
|
+
- lib/rubocop/rspec/expect_offense.rb
|
742
|
+
- lib/rubocop/rspec/host_environment_simulation_helper.rb
|
743
|
+
- lib/rubocop/rspec/shared_contexts.rb
|
744
|
+
- lib/rubocop/rspec/support.rb
|
745
|
+
- lib/rubocop/runner.rb
|
746
|
+
- lib/rubocop/string_interpreter.rb
|
747
|
+
- lib/rubocop/target_finder.rb
|
748
|
+
- lib/rubocop/target_ruby.rb
|
749
|
+
- lib/rubocop/version.rb
|
750
|
+
- lib/rubocop/warning.rb
|
751
|
+
- lib/rubocop/yaml_duplication_checker.rb
|
752
|
+
homepage: https://github.com/zspencer/rbhint
|
753
|
+
licenses:
|
754
|
+
- MIT
|
755
|
+
metadata:
|
756
|
+
homepage_uri: https://github.com/zspencer/rbhint/
|
757
|
+
changelog_uri: https://github.com/zspencer/rbhint/blob/development/CHANGELOG.md
|
758
|
+
source_code_uri: https://github.com/zspencer/rbhint/
|
759
|
+
documentation_uri: https://docs.rubocop.org/
|
760
|
+
bug_tracker_uri: https://github.com/zspencer/rbhint/issues
|
761
|
+
post_install_message:
|
762
|
+
rdoc_options: []
|
763
|
+
require_paths:
|
764
|
+
- lib
|
765
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
766
|
+
requirements:
|
767
|
+
- - ">="
|
768
|
+
- !ruby/object:Gem::Version
|
769
|
+
version: 2.4.0
|
770
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
771
|
+
requirements:
|
772
|
+
- - ">"
|
773
|
+
- !ruby/object:Gem::Version
|
774
|
+
version: 1.3.1
|
775
|
+
requirements: []
|
776
|
+
rubygems_version: 3.0.3
|
777
|
+
signing_key:
|
778
|
+
specification_version: 4
|
779
|
+
summary: Automatic Ruby code style checking tool.
|
780
|
+
test_files: []
|