sonicop 26.8.111 → 26.8.113
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 +4 -4
- data/CONFORMANCE.md +64 -31
- data/Cargo.lock +94 -19
- data/Cargo.toml +13 -8
- data/NOTICE +15 -3
- data/README.ja.md +145 -57
- data/README.md +140 -48
- data/build.rs +155 -0
- data/lib/sonicop/runner.rb +7 -1
- data/lib/sonicop/version.rb +1 -1
- data/src/cli.rs +216 -45
- data/src/config/inheritance.rs +637 -64
- data/src/config/mod.rs +130 -1
- data/src/config/paths.rs +550 -48
- data/src/cop_name.rs +18 -1
- data/src/diagnostic.rs +168 -3
- data/src/directives.rs +398 -77
- data/src/display_width.rs +82 -42
- data/src/display_width_table.rs +506 -0
- data/src/engine.rs +1532 -51
- data/src/formatter.rs +10 -1
- data/src/lib.rs +2 -0
- data/src/main.rs +112 -1
- data/src/nul_bytes.rs +245 -47
- data/src/parser.rs +37 -0
- data/src/profile.rs +174 -24
- data/src/ruby_version.rs +167 -21
- data/src/rules/bundler/duplicated_group.rs +3 -2
- data/src/rules/bundler/gem_comment.rs +5 -4
- data/src/rules/gemspec/attribute_assignment.rs +4 -3
- data/src/rules/gemspec/deprecated_attribute_assignment.rs +7 -6
- data/src/rules/gemspec/duplicated_assignment.rs +4 -3
- data/src/rules/gemspec/require_mfa.rs +10 -9
- data/src/rules/gemspec/required_ruby_version.rs +3 -2
- data/src/rules/gemspec/support.rs +28 -8
- data/src/rules/layout/access_modifier_indentation.rs +13 -6
- data/src/rules/layout/argument_alignment.rs +19 -7
- data/src/rules/layout/array_alignment.rs +1 -2
- data/src/rules/layout/block_alignment.rs +74 -30
- data/src/rules/layout/block_end_newline.rs +5 -5
- data/src/rules/layout/class_structure.rs +13 -4
- data/src/rules/layout/closing_heredoc_indentation.rs +24 -5
- data/src/rules/layout/closing_parenthesis_indentation.rs +3 -3
- data/src/rules/layout/comment_indentation.rs +2 -1
- data/src/rules/layout/condition_position.rs +3 -2
- data/src/rules/layout/def_end_alignment.rs +10 -6
- data/src/rules/layout/dot_position.rs +1 -2
- data/src/rules/layout/else_alignment.rs +24 -14
- data/src/rules/layout/empty_line_after_guard_clause.rs +8 -7
- data/src/rules/layout/empty_line_after_multiline_condition.rs +5 -5
- data/src/rules/layout/empty_line_between_defs.rs +8 -6
- data/src/rules/layout/empty_lines_around_access_modifier.rs +22 -10
- data/src/rules/layout/empty_lines_around_arguments.rs +4 -4
- data/src/rules/layout/empty_lines_around_body.rs +8 -2
- data/src/rules/layout/empty_lines_around_exception_handling_keywords.rs +1 -2
- data/src/rules/layout/empty_lines_around_method_body.rs +3 -2
- data/src/rules/layout/end_alignment.rs +32 -7
- data/src/rules/layout/end_of_line.rs +14 -1
- data/src/rules/layout/extra_spacing.rs +9 -11
- data/src/rules/layout/first_array_element_indentation.rs +1 -2
- data/src/rules/layout/first_hash_element_indentation.rs +8 -6
- data/src/rules/layout/hash_alignment.rs +113 -19
- data/src/rules/layout/heredoc_argument_closing_parenthesis.rs +6 -5
- data/src/rules/layout/heredoc_indentation.rs +4 -3
- data/src/rules/layout/indentation_style.rs +6 -4
- data/src/rules/layout/indentation_width.rs +76 -16
- data/src/rules/layout/initial_indentation.rs +18 -5
- data/src/rules/layout/line_continuation_leading_space.rs +4 -3
- data/src/rules/layout/line_continuation_spacing.rs +4 -3
- data/src/rules/layout/line_length.rs +417 -43
- data/src/rules/layout/mod.rs +1 -1
- data/src/rules/layout/multiline_assignment_layout.rs +20 -3
- data/src/rules/layout/multiline_block_layout.rs +1 -2
- data/src/rules/layout/multiline_expression.rs +60 -31
- data/src/rules/layout/multiline_hash_brace_layout.rs +4 -3
- data/src/rules/layout/multiline_method_call_indentation.rs +1 -1
- data/src/rules/layout/multiline_operation_indentation.rs +3 -3
- data/src/rules/layout/redundant_line_break.rs +16 -5
- data/src/rules/layout/rescue_ensure_alignment.rs +20 -12
- data/src/rules/layout/single_line_block_chain.rs +13 -4
- data/src/rules/layout/space_around_block_parameters.rs +16 -2
- data/src/rules/layout/space_around_equals_in_parameter_default.rs +1 -2
- data/src/rules/layout/space_around_keyword.rs +22 -4
- data/src/rules/layout/space_around_operators.rs +34 -2
- data/src/rules/layout/space_before_brackets.rs +13 -6
- data/src/rules/layout/space_before_comma.rs +3 -2
- data/src/rules/layout/space_inside_array_literal_brackets.rs +25 -10
- data/src/rules/layout/space_inside_array_percent_literal.rs +7 -1
- data/src/rules/layout/space_inside_parens.rs +170 -87
- data/src/rules/layout/space_inside_range_literal.rs +53 -19
- data/src/rules/layout/space_inside_reference_brackets.rs +65 -3
- data/src/rules/layout/space_inside_string_interpolation.rs +147 -48
- data/src/rules/layout/support.rs +172 -26
- data/src/rules/layout/tokens.rs +47 -7
- data/src/rules/layout/trailing_whitespace.rs +5 -2
- data/src/rules/lint/access_modifier.rs +50 -5
- data/src/rules/lint/ambiguity.rs +97 -7
- data/src/rules/lint/ambiguous_block_association.rs +29 -12
- data/src/rules/lint/ambiguous_operator.rs +8 -0
- data/src/rules/lint/ambiguous_operator_precedence.rs +18 -1
- data/src/rules/lint/ambiguous_range.rs +15 -1
- data/src/rules/lint/ambiguous_regexp_literal.rs +40 -1
- data/src/rules/lint/array_literal_in_regexp.rs +13 -5
- data/src/rules/lint/assignment_in_condition.rs +3 -2
- data/src/rules/lint/blocks.rs +2 -1
- data/src/rules/lint/boolean_symbol.rs +4 -4
- data/src/rules/lint/constant_definition_in_block.rs +1 -2
- data/src/rules/lint/constant_reassignment.rs +9 -13
- data/src/rules/lint/constant_resolution.rs +8 -0
- data/src/rules/lint/cop_directives.rs +28 -4
- data/src/rules/lint/debugger.rs +59 -9
- data/src/rules/lint/deprecated_open_ssl_constant.rs +1 -2
- data/src/rules/lint/disjunctive_assignment_in_constructor.rs +2 -2
- data/src/rules/lint/duplicate_branch.rs +16 -6
- data/src/rules/lint/duplicate_case_condition.rs +5 -5
- data/src/rules/lint/duplicate_hash_key.rs +8 -4
- data/src/rules/lint/duplicate_match_pattern.rs +7 -5
- data/src/rules/lint/duplicate_methods.rs +133 -54
- data/src/rules/lint/duplicate_require.rs +1 -2
- data/src/rules/lint/duplicate_set_element.rs +19 -5
- data/src/rules/lint/empty_conditional_body.rs +19 -3
- data/src/rules/lint/empty_expression.rs +16 -1
- data/src/rules/lint/empty_in_pattern.rs +3 -2
- data/src/rules/lint/empty_when.rs +4 -4
- data/src/rules/lint/ensure_return.rs +3 -2
- data/src/rules/lint/float_comparison.rs +8 -6
- data/src/rules/lint/flow.rs +8 -5
- data/src/rules/lint/format_parameter_mismatch.rs +4 -3
- data/src/rules/lint/hash_compare_by_identity.rs +5 -4
- data/src/rules/lint/heredoc_method_call_position.rs +3 -2
- data/src/rules/lint/implicit_string_concatenation.rs +33 -3
- data/src/rules/lint/ineffective_access_modifier.rs +5 -4
- data/src/rules/lint/inherit_exception.rs +4 -3
- data/src/rules/lint/literal_as_condition.rs +51 -31
- data/src/rules/lint/literal_assignment_in_condition.rs +4 -3
- data/src/rules/lint/literal_in_interpolation.rs +66 -5
- data/src/rules/lint/literals.rs +10 -8
- data/src/rules/lint/missing_cop_enable_directive.rs +95 -18
- data/src/rules/lint/mod.rs +1 -0
- data/src/rules/lint/nested_method_definition.rs +36 -11
- data/src/rules/lint/nil_receiver.rs +420 -0
- data/src/rules/lint/no_return_in_begin_end_blocks.rs +2 -2
- data/src/rules/lint/node_equality.rs +8 -5
- data/src/rules/lint/non_atomic_file_operation.rs +9 -3
- data/src/rules/lint/non_deterministic_require_order.rs +5 -3
- data/src/rules/lint/non_local_exit_from_iterator.rs +22 -9
- data/src/rules/lint/number_conversion.rs +1 -1
- data/src/rules/lint/out_of_range_regexp_ref.rs +6 -4
- data/src/rules/lint/parentheses_as_grouped_expression.rs +5 -0
- data/src/rules/lint/redundant_cop_enable_directive.rs +3 -1
- data/src/rules/lint/redundant_dir_glob_sort.rs +1 -2
- data/src/rules/lint/redundant_safe_navigation.rs +47 -22
- data/src/rules/lint/redundant_splat_expansion.rs +4 -2
- data/src/rules/lint/redundant_string_coercion.rs +3 -2
- data/src/rules/lint/redundant_type_conversion.rs +16 -4
- data/src/rules/lint/regexp.rs +1 -3
- data/src/rules/lint/regexp_source.rs +2 -2
- data/src/rules/lint/regexp_tree.rs +38 -5
- data/src/rules/lint/require_range_parentheses.rs +5 -5
- data/src/rules/lint/rescue_exception.rs +4 -3
- data/src/rules/lint/rescue_type.rs +3 -2
- data/src/rules/lint/return_in_void_context.rs +8 -3
- data/src/rules/lint/safe_navigation_chain.rs +47 -11
- data/src/rules/lint/self_assignment.rs +20 -2
- data/src/rules/lint/shadowed_argument.rs +2 -2
- data/src/rules/lint/shadowed_exception.rs +2 -2
- data/src/rules/lint/suppressed_exception.rs +21 -3
- data/src/rules/lint/suppressed_exception_in_number_conversion.rs +4 -3
- data/src/rules/lint/symbol_conversion.rs +56 -8
- data/src/rules/lint/syntax.rs +195 -5
- data/src/rules/lint/top_level_return_with_argument.rs +11 -1
- data/src/rules/lint/triple_quotes.rs +3 -2
- data/src/rules/lint/unescaped_bracket_in_regexp.rs +1 -1
- data/src/rules/lint/unexpected_block_arity.rs +23 -5
- data/src/rules/lint/unified_integer.rs +18 -12
- data/src/rules/lint/unmodified_reduce_accumulator.rs +36 -7
- data/src/rules/lint/unreachable_code.rs +4 -4
- data/src/rules/lint/unreachable_loop.rs +26 -10
- data/src/rules/lint/unreachable_pattern_branch.rs +7 -5
- data/src/rules/lint/unused_block_argument.rs +2 -2
- data/src/rules/lint/unused_method_argument.rs +1 -2
- data/src/rules/lint/useless_assignment.rs +3 -2
- data/src/rules/lint/useless_constant_scoping.rs +3 -2
- data/src/rules/lint/useless_else_without_rescue.rs +4 -3
- data/src/rules/lint/useless_rescue.rs +5 -4
- data/src/rules/lint/useless_ruby2_keywords.rs +2 -1
- data/src/rules/lint/useless_setter_call.rs +5 -4
- data/src/rules/lint/useless_times.rs +4 -3
- data/src/rules/lint/variable_force.rs +307 -79
- data/src/rules/lint/void.rs +32 -20
- data/src/rules/metrics/abc_size.rs +197 -7
- data/src/rules/metrics/block_length.rs +19 -10
- data/src/rules/metrics/block_nesting.rs +1 -2
- data/src/rules/metrics/class_length.rs +16 -4
- data/src/rules/metrics/collection_literal_length.rs +2 -1
- data/src/rules/metrics/complexity.rs +52 -14
- data/src/rules/metrics/fragments.rs +10 -14
- data/src/rules/metrics/locals.rs +35 -14
- data/src/rules/metrics/method_length.rs +14 -6
- data/src/rules/metrics/parameter_lists.rs +7 -6
- data/src/rules/metrics/perceived_complexity.rs +1 -3
- data/src/rules/metrics/support.rs +94 -4
- data/src/rules/mod.rs +525 -80
- data/src/rules/naming/ascii_identifiers.rs +3 -3
- data/src/rules/naming/binary_operator_parameter_name.rs +5 -4
- data/src/rules/naming/block_forwarding.rs +9 -8
- data/src/rules/naming/constant_name.rs +56 -18
- data/src/rules/naming/file_name.rs +174 -43
- data/src/rules/naming/method_name.rs +8 -1
- data/src/rules/naming/predicate_method.rs +42 -14
- data/src/rules/naming/predicate_prefix.rs +70 -4
- data/src/rules/naming/rescued_exceptions_variable_name.rs +14 -11
- data/src/rules/naming/support.rs +54 -295
- data/src/rules/naming/variable_name.rs +17 -4
- data/src/rules/naming/variable_number.rs +9 -10
- data/src/rules/node_ext.rs +1 -1
- data/src/rules/ruby_literal.rs +8 -3
- data/src/rules/security/compound_hash.rs +3 -2
- data/src/rules/security/open.rs +5 -4
- data/src/rules/send_node.rs +134 -0
- data/src/rules/single_line.rs +4 -4
- data/src/rules/style/access_modifier_declarations.rs +76 -22
- data/src/rules/style/accessor_grouping.rs +44 -6
- data/src/rules/style/alias.rs +4 -3
- data/src/rules/style/and_or.rs +2 -2
- data/src/rules/style/arguments_forwarding.rs +5 -5
- data/src/rules/style/array_coercion.rs +5 -5
- data/src/rules/style/array_first_last.rs +19 -4
- data/src/rules/style/array_intersect.rs +26 -8
- data/src/rules/style/array_intersect_with_single_element.rs +1 -1
- data/src/rules/style/ascii_comments.rs +2 -0
- data/src/rules/style/attr.rs +1 -1
- data/src/rules/style/auto_resource_cleanup.rs +1 -1
- data/src/rules/style/bitwise_predicate.rs +2 -2
- data/src/rules/style/block_args.rs +1 -1
- data/src/rules/style/block_comments.rs +11 -2
- data/src/rules/style/block_delimiters.rs +154 -10
- data/src/rules/style/case_equality.rs +7 -2
- data/src/rules/style/case_like_if.rs +26 -2
- data/src/rules/style/class_and_module_children.rs +162 -10
- data/src/rules/style/class_methods.rs +1 -1
- data/src/rules/style/class_methods_definitions.rs +9 -0
- data/src/rules/style/collection_compact.rs +4 -4
- data/src/rules/style/combinable_defined.rs +2 -2
- data/src/rules/style/combinable_loops.rs +9 -11
- data/src/rules/style/comments.rs +6 -3
- data/src/rules/style/comparable_clamp.rs +2 -2
- data/src/rules/style/concat_array_literals.rs +3 -3
- data/src/rules/style/conditional.rs +12 -1
- data/src/rules/style/conditional_assignment.rs +133 -4
- data/src/rules/style/constant_visibility.rs +3 -3
- data/src/rules/style/copyright.rs +64 -3
- data/src/rules/style/data_inheritance.rs +1 -1
- data/src/rules/style/def_with_parentheses.rs +1 -1
- data/src/rules/style/document_dynamic_eval_definition.rs +50 -12
- data/src/rules/style/documentation.rs +1 -1
- data/src/rules/style/each_for_simple_loop.rs +1 -1
- data/src/rules/style/each_with_object.rs +4 -4
- data/src/rules/style/empty_block_parameter.rs +1 -1
- data/src/rules/style/empty_case_condition.rs +6 -6
- data/src/rules/style/empty_class_definition.rs +1 -1
- data/src/rules/style/empty_else.rs +1 -1
- data/src/rules/style/empty_heredoc.rs +14 -1
- data/src/rules/style/empty_lambda_parameter.rs +1 -1
- data/src/rules/style/empty_literal.rs +34 -2
- data/src/rules/style/empty_method.rs +1 -1
- data/src/rules/style/empty_string_inside_interpolation.rs +1 -1
- data/src/rules/style/endless.rs +11 -3
- data/src/rules/style/env_home.rs +1 -1
- data/src/rules/style/eval_with_location.rs +6 -0
- data/src/rules/style/even_odd.rs +1 -1
- data/src/rules/style/exact_regexp_match.rs +1 -1
- data/src/rules/style/expand_path_arguments.rs +3 -3
- data/src/rules/style/explicit_block_argument.rs +3 -3
- data/src/rules/style/file_open.rs +5 -0
- data/src/rules/style/file_open_call.rs +3 -3
- data/src/rules/style/file_write.rs +1 -1
- data/src/rules/style/for.rs +1 -1
- data/src/rules/style/format_sequences.rs +6 -0
- data/src/rules/style/format_string.rs +75 -11
- data/src/rules/style/format_string_token.rs +61 -12
- data/src/rules/style/frozen_string_literal_comment.rs +62 -4
- data/src/rules/style/guard_clause.rs +8 -7
- data/src/rules/style/hash_as_last_array_item.rs +4 -4
- data/src/rules/style/hash_each_methods.rs +1 -1
- data/src/rules/style/hash_like_case.rs +8 -8
- data/src/rules/style/hash_lookup_method.rs +43 -3
- data/src/rules/style/hash_subset.rs +16 -10
- data/src/rules/style/hash_syntax.rs +609 -71
- data/src/rules/style/hash_transform.rs +20 -18
- data/src/rules/style/hash_transform_keys.rs +7 -0
- data/src/rules/style/hash_transform_values.rs +7 -0
- data/src/rules/style/identical_conditional_branches.rs +54 -5
- data/src/rules/style/if_inside_else.rs +19 -3
- data/src/rules/style/if_unless_modifier.rs +13 -14
- data/src/rules/style/if_with_boolean_literal_branches.rs +1 -1
- data/src/rules/style/if_with_semicolon.rs +7 -1
- data/src/rules/style/implicit_runtime_error.rs +7 -0
- data/src/rules/style/in_pattern_then.rs +2 -2
- data/src/rules/style/infinite_loop.rs +6 -0
- data/src/rules/style/inline_comment.rs +4 -1
- data/src/rules/style/inverse_methods.rs +12 -2
- data/src/rules/style/invertible_unless_condition.rs +12 -12
- data/src/rules/style/it_block_parameter.rs +5 -2
- data/src/rules/style/keyword_arguments_merging.rs +8 -2
- data/src/rules/style/keyword_parameters_order.rs +1 -1
- data/src/rules/style/line_end_concatenation.rs +1 -1
- data/src/rules/style/magic_comment_format.rs +14 -6
- data/src/rules/style/map_chain.rs +1 -1
- data/src/rules/style/map_compact_with_conditional_block.rs +3 -3
- data/src/rules/style/map_into_array.rs +7 -7
- data/src/rules/style/map_join.rs +3 -3
- data/src/rules/style/method_call_with_args_parentheses.rs +7 -7
- data/src/rules/style/method_call_without_args_parentheses.rs +2 -2
- data/src/rules/style/method_def_parentheses.rs +2 -3
- data/src/rules/style/min_max.rs +3 -3
- data/src/rules/style/min_max_comparison.rs +2 -2
- data/src/rules/style/missing_else.rs +1 -1
- data/src/rules/style/missing_respond_to_missing.rs +1 -1
- data/src/rules/style/mixin_grouping.rs +6 -7
- data/src/rules/style/multiline_block_chain.rs +6 -8
- data/src/rules/style/multiline_if_then.rs +1 -1
- data/src/rules/style/multiline_in_pattern_then.rs +16 -3
- data/src/rules/style/multiline_method_signature.rs +1 -1
- data/src/rules/style/multiline_when_then.rs +2 -2
- data/src/rules/style/mutable_constant.rs +31 -35
- data/src/rules/style/negated_if.rs +2 -2
- data/src/rules/style/negated_if_else_condition.rs +5 -3
- data/src/rules/style/negated_while.rs +1 -1
- data/src/rules/style/negative_array_index.rs +25 -3
- data/src/rules/style/nested_modifier.rs +1 -1
- data/src/rules/style/nested_parenthesized_calls.rs +2 -2
- data/src/rules/style/nested_ternary_operator.rs +2 -2
- data/src/rules/style/next.rs +12 -12
- data/src/rules/style/nil_lambda.rs +2 -2
- data/src/rules/style/nodes.rs +21 -0
- data/src/rules/style/non_nil_check.rs +82 -2
- data/src/rules/style/numbered_parameters.rs +4 -1
- data/src/rules/style/numbered_parameters_limit.rs +2 -2
- data/src/rules/style/numeric_literals.rs +17 -1
- data/src/rules/style/numeric_predicate.rs +25 -6
- data/src/rules/style/one_line_conditional.rs +24 -7
- data/src/rules/style/operator_method_call.rs +5 -0
- data/src/rules/style/optional_arguments.rs +1 -1
- data/src/rules/style/or_assignment.rs +1 -1
- data/src/rules/style/parallel_assignment.rs +20 -9
- data/src/rules/style/parens.rs +1 -1
- data/src/rules/style/parentheses_around_condition.rs +3 -3
- data/src/rules/style/partition_instead_of_double_select.rs +3 -3
- data/src/rules/style/percent.rs +18 -9
- data/src/rules/style/percent_q_literals.rs +40 -7
- data/src/rules/style/preferred_hash_methods.rs +1 -1
- data/src/rules/style/quoted_symbols.rs +6 -0
- data/src/rules/style/raise_args.rs +26 -20
- data/src/rules/style/random_with_offset.rs +1 -1
- data/src/rules/style/reduce_to_hash.rs +6 -6
- data/src/rules/style/redundant_argument.rs +1 -1
- data/src/rules/style/redundant_assignment.rs +5 -5
- data/src/rules/style/redundant_begin.rs +5 -3
- data/src/rules/style/redundant_capital_w.rs +3 -2
- data/src/rules/style/redundant_condition.rs +17 -8
- data/src/rules/style/redundant_current_directory_in_path.rs +2 -2
- data/src/rules/style/redundant_double_splat_hash_braces.rs +15 -5
- data/src/rules/style/redundant_exception.rs +3 -1
- data/src/rules/style/redundant_file_extension_in_require.rs +2 -2
- data/src/rules/style/redundant_format.rs +98 -20
- data/src/rules/style/redundant_freeze.rs +1 -1
- data/src/rules/style/redundant_heredoc_delimiter_quotes.rs +1 -1
- data/src/rules/style/redundant_initialize.rs +6 -3
- data/src/rules/style/redundant_interpolation.rs +8 -8
- data/src/rules/style/redundant_interpolation_unfreeze.rs +10 -3
- data/src/rules/style/redundant_line_continuation.rs +10 -7
- data/src/rules/style/redundant_parentheses.rs +96 -19
- data/src/rules/style/redundant_regexp_argument.rs +1 -1
- data/src/rules/style/redundant_regexp_character_class.rs +4 -3
- data/src/rules/style/redundant_regexp_escape.rs +3 -2
- data/src/rules/style/redundant_return.rs +1 -2
- data/src/rules/style/redundant_self.rs +28 -16
- data/src/rules/style/redundant_sort.rs +1 -1
- data/src/rules/style/redundant_sort_by.rs +1 -1
- data/src/rules/style/redundant_string_escape.rs +6 -5
- data/src/rules/style/regexp_literal.rs +3 -2
- data/src/rules/style/require_order.rs +2 -2
- data/src/rules/style/rescue_modifier.rs +9 -4
- data/src/rules/style/rescue_standard_error.rs +1 -1
- data/src/rules/style/return_nil.rs +2 -2
- data/src/rules/style/return_nil_in_predicate_method_definition.rs +2 -2
- data/src/rules/style/safe_navigation.rs +2 -2
- data/src/rules/style/safe_navigation_chain_length.rs +8 -1
- data/src/rules/style/sample.rs +3 -3
- data/src/rules/style/select_by.rs +6 -2
- data/src/rules/style/select_by_range.rs +1 -1
- data/src/rules/style/semicolon.rs +77 -4
- data/src/rules/style/signal_exception.rs +60 -3
- data/src/rules/style/single_argument_dig.rs +10 -2
- data/src/rules/style/single_line_block_params.rs +14 -4
- data/src/rules/style/single_line_do_end_block.rs +13 -12
- data/src/rules/style/single_line_methods.rs +2 -2
- data/src/rules/style/slicing_with_range.rs +2 -2
- data/src/rules/style/sole_nested_conditional.rs +4 -4
- data/src/rules/style/special_global_vars.rs +2 -2
- data/src/rules/style/stabby_lambda_parentheses.rs +1 -1
- data/src/rules/style/statement_modifier.rs +3 -2
- data/src/rules/style/static_class.rs +7 -1
- data/src/rules/style/string_concatenation.rs +12 -7
- data/src/rules/style/string_hash_keys.rs +3 -2
- data/src/rules/style/string_literals.rs +3 -3
- data/src/rules/style/string_literals_in_interpolation.rs +4 -1
- data/src/rules/style/struct_inheritance.rs +3 -3
- data/src/rules/style/super_arguments.rs +15 -7
- data/src/rules/style/super_with_args_parentheses.rs +49 -12
- data/src/rules/style/swap_values.rs +1 -1
- data/src/rules/style/symbol_array.rs +9 -2
- data/src/rules/style/symbol_proc.rs +3 -3
- data/src/rules/style/tally_method.rs +4 -4
- data/src/rules/style/ternary_parentheses.rs +30 -15
- data/src/rules/style/top_level_method_definition.rs +10 -5
- data/src/rules/style/trailing_body.rs +1 -1
- data/src/rules/style/trailing_comma.rs +206 -10
- data/src/rules/style/trailing_comma_in_arguments.rs +9 -10
- data/src/rules/style/trailing_comma_in_array_literal.rs +2 -1
- data/src/rules/style/trailing_comma_in_hash_literal.rs +2 -1
- data/src/rules/style/trailing_method_end_statement.rs +6 -1
- data/src/rules/style/trailing_underscore_variable.rs +4 -5
- data/src/rules/style/trivial_accessors.rs +2 -2
- data/src/rules/style/unless_logical_operators.rs +1 -1
- data/src/rules/style/unpack_first.rs +11 -2
- data/src/rules/style/when_then.rs +4 -4
- data/src/rules/style/while_until_do.rs +1 -1
- data/src/rules/style/while_until_modifier.rs +3 -3
- data/src/rules/style/word_array.rs +9 -7
- data/src/rules/style/yoda_condition.rs +2 -2
- data/src/rules/style/zero_length_predicate.rs +5 -0
- data/src/rules/support.rs +128 -11
- data/src/source.rs +18 -15
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60de249d7f58e674b388a3514790bbaf79f4fc4ce59338d281b1684fbe124bd2
|
|
4
|
+
data.tar.gz: afe8bb37e97f4c4043825877ca906d79e7511dc98e1ac6270a8b2d84a3824f30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 856f0aab5b6a28b07ddc026d2513b9415f7b50b3697b1e256667796683b929dade0950e22b71dc90259d98ab6ef5ffb43f5db7ab059e2d3948deacdafc080251
|
|
7
|
+
data.tar.gz: ebfba527d38101fec7b231c916dfb5ee3c47f602da107a555a8a7df56c1393c4c2ed968f1f113881a73a723cd8136593e7c1e304ffd81fe52b2e1795ff216d7e
|
data/CONFORMANCE.md
CHANGED
|
@@ -55,17 +55,18 @@ sonicop --force-default-config --format json
|
|
|
55
55
|
|
|
56
56
|
## Results
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
`Lint/Syntax`
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
Three kinds of difference are counted separately because they mean different things. The set of
|
|
59
|
+
files with a fatal `Lint/Syntax` offense says whether the parsers disagree about accepting a file.
|
|
60
|
+
`Lint/Syntax` positions inside a file both already rejected measure diagnostic recovery, not file
|
|
61
|
+
acceptance. A difference in any other cop says the port reads the same tree and draws a different
|
|
62
|
+
conclusion. Only the last category is a defect in a cop.
|
|
62
63
|
|
|
63
64
|
| Corpus | Excess | Missing | of which `Lint/Syntax` | Other cops | Field differences | Measured |
|
|
64
65
|
|---|---:|---:|---|---:|---|---|
|
|
65
66
|
| rubocop/rubocop | 0 | 0 | — | 0 | correctable ×1 | 2026-08-17 |
|
|
66
67
|
| rails/rails | 0 | 0 | — | 0 | none | 2026-08-17 |
|
|
67
68
|
| mastodon/mastodon | 0 | 0 | — | 0 | none | 2026-08-17 |
|
|
68
|
-
| Homebrew/brew | 263 | 997 | **all of them** | **0** | none | 2026-08-
|
|
69
|
+
| Homebrew/brew | 263 | 997 | **all of them** | **0** | none | 2026-08-18 |
|
|
69
70
|
| ruby/ruby | 142 | 585 | 117 missing, 44 excess | 92 | 5 | 2026-08-16 |
|
|
70
71
|
|
|
71
72
|
The last column is per row on purpose. A single date at the top of the file would say the five were
|
|
@@ -85,14 +86,19 @@ run starts from, and `TargetRubyVersion` is only inferred from the working direc
|
|
|
85
86
|
tools therefore fall back to the default of 2.7 (RuboCop says so itself: `Using Ruby 2.7 parser`) and
|
|
86
87
|
both call `dry_run:,` — a hash value omission, valid since 3.1 — a syntax error. **Run the same corpus
|
|
87
88
|
at 3.1 and both report zero `Lint/Syntax`.** What is left is not disagreement about which files parse:
|
|
88
|
-
the file sets are identical, 569 on each side,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
the file sets are identical, 569 on each side, with no file unique to either parser. The two parsers
|
|
90
|
+
recover differently after encountering invalid syntax, which puts diagnostic positions on both sides
|
|
91
|
+
of the ledger rather than only on RuboCop's.
|
|
92
|
+
|
|
93
|
+
All 263 Sonicop-only positions were classified mechanically, not inferred from their cop name. They
|
|
94
|
+
occur in 135 of those shared syntax-error files, and every one follows a `Lint/Syntax` position that
|
|
95
|
+
both tools reported in the same file. Their messages are 113 end-of-input (`$end`), 86 right
|
|
96
|
+
parentheses (`tRPAREN`), 53 commas (`tCOMMA`), seven `end` keywords (`kEND`), two equals signs
|
|
97
|
+
(`tEQL`), one `when` (`kWHEN`) and one identifier (`tIDENTIFIER`). Thus the former “excess” is not a
|
|
98
|
+
set of valid files rejected only by Sonicop; it is the other direction of the same diagnostic-recovery
|
|
99
|
+
divergence as the 997 RuboCop-only positions. Suppressing every diagnostic after Sonicop's first one
|
|
100
|
+
would make the excess zero, but would also discard 1,998 positions that already match and increase the
|
|
101
|
+
missing side from 997 to 2,995. That is not a conformance fix. See *Known divergences*.
|
|
96
102
|
|
|
97
103
|
Much of ruby/ruby's difference is the same shape,
|
|
98
104
|
with 117 of the 585 missing and 44 of the 142 excess being `Lint/Syntax` itself,
|
|
@@ -181,10 +187,10 @@ but no longer reproduces fails the test, and so does one that appears without be
|
|
|
181
187
|
### Error recovery after a syntax error
|
|
182
188
|
|
|
183
189
|
RuboCop parses with `parser`, an LALR parser that recovers from an error and keeps going, emitting
|
|
184
|
-
further diagnostics from the recovered state. Sonicop parses with tree-sitter
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
`cannot assign to a keyword`, and repeated `unexpected token` inside one multi-line hash.
|
|
190
|
+
further diagnostics from the recovered state. Sonicop parses with tree-sitter and reaches different
|
|
191
|
+
recovery states. On Homebrew this produces 997 RuboCop-only and 263 Sonicop-only `Lint/Syntax`
|
|
192
|
+
positions: examples on the RuboCop side include `class definition in method body`, `dynamic constant
|
|
193
|
+
assignment`, `cannot assign to a keyword`, and repeated `unexpected token` inside one multi-line hash.
|
|
188
194
|
|
|
189
195
|
What the divergence does not change is **which** files are held to be unparseable, and that is what
|
|
190
196
|
decides whether a file is inspected at all: RuboCop runs no cop other than `Lint/Syntax` on a file
|
|
@@ -198,9 +204,10 @@ programs, one of which is English prose that happens to parse as Ruby — where
|
|
|
198
204
|
error and `parser` does not. Those five hold 465 of that corpus's 773 differences.
|
|
199
205
|
|
|
200
206
|
Within Homebrew's 569 files the agreement is partial, as recovery cannot be reproduced: 499 report the
|
|
201
|
-
same first diagnostic (position and message), and 222 report an identical list end to end.
|
|
202
|
-
|
|
203
|
-
|
|
207
|
+
same first diagnostic (position and message), and 222 report an identical list end to end. In all 569,
|
|
208
|
+
Sonicop's earliest source-position diagnostic is also present in RuboCop's output. The 277 files in
|
|
209
|
+
between are the divergence in its purest form — the two agree on at least one error position and part
|
|
210
|
+
company as recovery proceeds. The 70
|
|
204
211
|
files whose first diagnostic differs follow one shape — an endless method definition (`def to_s =
|
|
205
212
|
to_str`, valid from Ruby 3.0, rejected by the default `TargetRubyVersion: 2.7`) leaves `parser`'s
|
|
206
213
|
method context open, so the enclosing `class` emits `class definition in method body` when it is
|
|
@@ -299,17 +306,43 @@ defect, so the difference stands as it is.
|
|
|
299
306
|
## Limits
|
|
300
307
|
|
|
301
308
|
A clean run is a property of the corpora, not a general claim. `known_divergences.yml` carries the
|
|
302
|
-
current list of what these corpora never exercise; the main ones are
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
309
|
+
current list of what these corpora never exercise; the main ones are extension plugins and Windows
|
|
310
|
+
line endings. Cops that never fire contribute nothing to a match count, and their silence is
|
|
311
|
+
indistinguishable from agreement.
|
|
312
|
+
|
|
313
|
+
Non-default configuration values used to be the largest of those gaps, and are now measured. Every
|
|
314
|
+
one of the 111 cops carrying an `Enforced*` setting was switched to a non-default value at once —
|
|
315
|
+
`Layout/SpaceInsideParens` to `space`, `Style/HashSyntax` to `hash_rockets` with
|
|
316
|
+
`EnforcedShorthandSyntax: always`, and so on — and rubocop/rubocop re-run against RuboCop under the
|
|
317
|
+
same file. Of 622,317 reference offenses, **99.99% match**, and 84 of the 96 cops that fired match
|
|
318
|
+
exactly.
|
|
319
|
+
|
|
320
|
+
| Cop | Offenses differing | |
|
|
321
|
+
|---|---:|---|
|
|
322
|
+
| `Layout/HashAlignment` | 35 | **RuboCop's own bug**, see below |
|
|
323
|
+
| `Style/BlockDelimiters` | 17 | |
|
|
324
|
+
| `Style/ConditionalAssignment` | 12 | |
|
|
325
|
+
| `Style/MixinGrouping` | 8 | |
|
|
326
|
+
| `Layout/SpaceInsideStringInterpolation` | 6 | |
|
|
327
|
+
| `Style/NumericPredicate` | 5 | |
|
|
328
|
+
| `Style/PercentQLiterals` | 4 | |
|
|
329
|
+
| `Naming/VariableName` | 3 | |
|
|
330
|
+
| `Lint/SymbolConversion` | 3 | |
|
|
331
|
+
| `Layout/SpaceInsideParens` | 1 | |
|
|
332
|
+
|
|
333
|
+
`Layout/HashAlignment`'s 35 are not a defect here. Under `EnforcedHashRocketStyle: separator`
|
|
334
|
+
RuboCop raises `Parser::ClobberingError` on `spec/rubocop/config_loader_spec.rb` — three times, at
|
|
335
|
+
`1111:35`, `1130:38` and `1217:35` — and reports nothing for the hashes it crashed on. Sonicop
|
|
336
|
+
inspects them and reports. Every one of the 35 sits in that file between lines 1114 and 1234.
|
|
337
|
+
Reproduce with:
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
rubocop -c <variants.yml> --only Layout/HashAlignment -d spec/rubocop/config_loader_spec.rb
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
One value per cop is not the whole configuration space — a cop with four supported styles is
|
|
344
|
+
measured at two of them — so this is a floor, not a ceiling. It does settle the shape of the old
|
|
345
|
+
limit: a cop is no longer allowed to be half absent and still count as matching.
|
|
313
346
|
|
|
314
347
|
The 215 cops RuboCop ships switched off are a limit of a different kind. They are implemented, but a
|
|
315
348
|
default run never reaches them, so the corpus numbers above say nothing about them. What stands
|
data/Cargo.lock
CHANGED
|
@@ -67,6 +67,18 @@ version = "1.0.104"
|
|
|
67
67
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
68
68
|
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
|
69
69
|
|
|
70
|
+
[[package]]
|
|
71
|
+
name = "arrayref"
|
|
72
|
+
version = "0.3.9"
|
|
73
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
74
|
+
checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
|
|
75
|
+
|
|
76
|
+
[[package]]
|
|
77
|
+
name = "arrayvec"
|
|
78
|
+
version = "0.7.8"
|
|
79
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
80
|
+
checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"
|
|
81
|
+
|
|
70
82
|
[[package]]
|
|
71
83
|
name = "assert_cmd"
|
|
72
84
|
version = "2.2.2"
|
|
@@ -100,11 +112,25 @@ version = "2.13.1"
|
|
|
100
112
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
101
113
|
checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
|
|
102
114
|
|
|
115
|
+
[[package]]
|
|
116
|
+
name = "blake3"
|
|
117
|
+
version = "1.8.6"
|
|
118
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
119
|
+
checksum = "76ae7bad254120e9e4c63bafc385310756f90c484eac0e36b8317cf09cb92a77"
|
|
120
|
+
dependencies = [
|
|
121
|
+
"arrayref",
|
|
122
|
+
"arrayvec",
|
|
123
|
+
"cc",
|
|
124
|
+
"cfg-if",
|
|
125
|
+
"constant_time_eq",
|
|
126
|
+
"cpufeatures",
|
|
127
|
+
]
|
|
128
|
+
|
|
103
129
|
[[package]]
|
|
104
130
|
name = "bstr"
|
|
105
|
-
version = "1.13.
|
|
131
|
+
version = "1.13.1"
|
|
106
132
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
107
|
-
checksum = "
|
|
133
|
+
checksum = "6bb31b46c14244e20ee9984b11bf5c992b91fb6939fea616e3512c8baecdbe5f"
|
|
108
134
|
dependencies = [
|
|
109
135
|
"memchr",
|
|
110
136
|
"regex-automata",
|
|
@@ -119,9 +145,9 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
|
119
145
|
|
|
120
146
|
[[package]]
|
|
121
147
|
name = "cc"
|
|
122
|
-
version = "1.4.
|
|
148
|
+
version = "1.4.3"
|
|
123
149
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
124
|
-
checksum = "
|
|
150
|
+
checksum = "509591b7bcd67f4ef775afad7662703b4935daaa6ec0e5605cfb1090b32a2b6d"
|
|
125
151
|
dependencies = [
|
|
126
152
|
"find-msvc-tools",
|
|
127
153
|
"shlex",
|
|
@@ -135,9 +161,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
|
135
161
|
|
|
136
162
|
[[package]]
|
|
137
163
|
name = "clap"
|
|
138
|
-
version = "4.6.
|
|
164
|
+
version = "4.6.6"
|
|
139
165
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
140
|
-
checksum = "
|
|
166
|
+
checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"
|
|
141
167
|
dependencies = [
|
|
142
168
|
"clap_builder",
|
|
143
169
|
"clap_derive",
|
|
@@ -145,9 +171,9 @@ dependencies = [
|
|
|
145
171
|
|
|
146
172
|
[[package]]
|
|
147
173
|
name = "clap_builder"
|
|
148
|
-
version = "4.6.
|
|
174
|
+
version = "4.6.6"
|
|
149
175
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
150
|
-
checksum = "
|
|
176
|
+
checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"
|
|
151
177
|
dependencies = [
|
|
152
178
|
"anstream",
|
|
153
179
|
"anstyle",
|
|
@@ -180,6 +206,12 @@ version = "1.0.5"
|
|
|
180
206
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
181
207
|
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
|
|
182
208
|
|
|
209
|
+
[[package]]
|
|
210
|
+
name = "constant_time_eq"
|
|
211
|
+
version = "0.4.2"
|
|
212
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
213
|
+
checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b"
|
|
214
|
+
|
|
183
215
|
[[package]]
|
|
184
216
|
name = "core-foundation"
|
|
185
217
|
version = "0.10.1"
|
|
@@ -196,6 +228,15 @@ version = "0.8.7"
|
|
|
196
228
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
197
229
|
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
|
198
230
|
|
|
231
|
+
[[package]]
|
|
232
|
+
name = "cpufeatures"
|
|
233
|
+
version = "0.3.0"
|
|
234
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
235
|
+
checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
|
|
236
|
+
dependencies = [
|
|
237
|
+
"libc",
|
|
238
|
+
]
|
|
239
|
+
|
|
199
240
|
[[package]]
|
|
200
241
|
name = "crossbeam-deque"
|
|
201
242
|
version = "0.8.7"
|
|
@@ -295,6 +336,16 @@ version = "0.1.1"
|
|
|
295
336
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
296
337
|
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
|
297
338
|
|
|
339
|
+
[[package]]
|
|
340
|
+
name = "fs2"
|
|
341
|
+
version = "0.4.3"
|
|
342
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
343
|
+
checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
|
|
344
|
+
dependencies = [
|
|
345
|
+
"libc",
|
|
346
|
+
"winapi",
|
|
347
|
+
]
|
|
348
|
+
|
|
298
349
|
[[package]]
|
|
299
350
|
name = "getrandom"
|
|
300
351
|
version = "0.4.3"
|
|
@@ -308,9 +359,9 @@ dependencies = [
|
|
|
308
359
|
|
|
309
360
|
[[package]]
|
|
310
361
|
name = "globset"
|
|
311
|
-
version = "0.4.
|
|
362
|
+
version = "0.4.20"
|
|
312
363
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
313
|
-
checksum = "
|
|
364
|
+
checksum = "07c34a9410465b45bd9787443bc7370f37735bad04b0f0cd57ff1a3186c98988"
|
|
314
365
|
dependencies = [
|
|
315
366
|
"aho-corasick",
|
|
316
367
|
"bstr",
|
|
@@ -349,9 +400,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
|
349
400
|
|
|
350
401
|
[[package]]
|
|
351
402
|
name = "ignore"
|
|
352
|
-
version = "0.4.
|
|
403
|
+
version = "0.4.33"
|
|
353
404
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
354
|
-
checksum = "
|
|
405
|
+
checksum = "00b69833ed729dc5aa7d19541d96d6cf8e9137194207a04916d658e43168402f"
|
|
355
406
|
dependencies = [
|
|
356
407
|
"crossbeam-deque",
|
|
357
408
|
"globset",
|
|
@@ -498,9 +549,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
|
|
|
498
549
|
|
|
499
550
|
[[package]]
|
|
500
551
|
name = "pkg-config"
|
|
501
|
-
version = "0.3.
|
|
552
|
+
version = "0.3.34"
|
|
502
553
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
503
|
-
checksum = "
|
|
554
|
+
checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
|
|
504
555
|
|
|
505
556
|
[[package]]
|
|
506
557
|
name = "predicates"
|
|
@@ -742,12 +793,14 @@ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
|
742
793
|
|
|
743
794
|
[[package]]
|
|
744
795
|
name = "sonicop"
|
|
745
|
-
version = "26.8.
|
|
796
|
+
version = "26.8.113"
|
|
746
797
|
dependencies = [
|
|
747
798
|
"anyhow",
|
|
748
799
|
"assert_cmd",
|
|
800
|
+
"blake3",
|
|
749
801
|
"clap",
|
|
750
802
|
"encoding_rs",
|
|
803
|
+
"fs2",
|
|
751
804
|
"globset",
|
|
752
805
|
"ignore",
|
|
753
806
|
"rayon",
|
|
@@ -827,9 +880,9 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
|
|
|
827
880
|
|
|
828
881
|
[[package]]
|
|
829
882
|
name = "tree-sitter"
|
|
830
|
-
version = "0.26.
|
|
883
|
+
version = "0.26.12"
|
|
831
884
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
832
|
-
checksum = "
|
|
885
|
+
checksum = "83c567a8e18ae93f20982c90370b16fd24023aeaf52f6052b96957ab253a0fec"
|
|
833
886
|
dependencies = [
|
|
834
887
|
"cc",
|
|
835
888
|
"regex",
|
|
@@ -847,8 +900,8 @@ checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782"
|
|
|
847
900
|
|
|
848
901
|
[[package]]
|
|
849
902
|
name = "tree-sitter-ruby"
|
|
850
|
-
version = "26.8.
|
|
851
|
-
source = "git+https://github.com/owayo/tree-sitter-ruby.git?tag=v26.8.
|
|
903
|
+
version = "26.8.103"
|
|
904
|
+
source = "git+https://github.com/owayo/tree-sitter-ruby.git?tag=v26.8.103#e3b414485ce2b0a154334f02576ec79c27154326"
|
|
852
905
|
dependencies = [
|
|
853
906
|
"cc",
|
|
854
907
|
"tree-sitter-language",
|
|
@@ -941,6 +994,22 @@ dependencies = [
|
|
|
941
994
|
"rustls-pki-types",
|
|
942
995
|
]
|
|
943
996
|
|
|
997
|
+
[[package]]
|
|
998
|
+
name = "winapi"
|
|
999
|
+
version = "0.3.9"
|
|
1000
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1001
|
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
1002
|
+
dependencies = [
|
|
1003
|
+
"winapi-i686-pc-windows-gnu",
|
|
1004
|
+
"winapi-x86_64-pc-windows-gnu",
|
|
1005
|
+
]
|
|
1006
|
+
|
|
1007
|
+
[[package]]
|
|
1008
|
+
name = "winapi-i686-pc-windows-gnu"
|
|
1009
|
+
version = "0.4.0"
|
|
1010
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1011
|
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
1012
|
+
|
|
944
1013
|
[[package]]
|
|
945
1014
|
name = "winapi-util"
|
|
946
1015
|
version = "0.1.11"
|
|
@@ -950,6 +1019,12 @@ dependencies = [
|
|
|
950
1019
|
"windows-sys",
|
|
951
1020
|
]
|
|
952
1021
|
|
|
1022
|
+
[[package]]
|
|
1023
|
+
name = "winapi-x86_64-pc-windows-gnu"
|
|
1024
|
+
version = "0.4.0"
|
|
1025
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1026
|
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
1027
|
+
|
|
953
1028
|
[[package]]
|
|
954
1029
|
name = "windows-link"
|
|
955
1030
|
version = "0.2.1"
|
data/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "sonicop"
|
|
3
|
-
version = "26.8.
|
|
3
|
+
version = "26.8.113"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
rust-version = "1.85"
|
|
6
6
|
description = "A fast, native RuboCop-compatible Ruby linter and formatter"
|
|
@@ -16,10 +16,12 @@ path = "src/main.rs"
|
|
|
16
16
|
|
|
17
17
|
[dependencies]
|
|
18
18
|
anyhow = "1.0.104"
|
|
19
|
-
|
|
19
|
+
blake3 = "1.8.6"
|
|
20
|
+
clap = { version = "4.6.6", features = ["derive", "wrap_help"] }
|
|
20
21
|
encoding_rs = "0.8.35"
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
fs2 = "0.4.3"
|
|
23
|
+
globset = "0.4.20"
|
|
24
|
+
ignore = "0.4.33"
|
|
23
25
|
rayon = "1.12.0"
|
|
24
26
|
regex = "1.13.1"
|
|
25
27
|
serde = { version = "1.0.229", features = ["derive"] }
|
|
@@ -27,20 +29,23 @@ serde_json = "1.0.151"
|
|
|
27
29
|
serde_yaml_ng = "0.10"
|
|
28
30
|
shell-words = "1.1.1"
|
|
29
31
|
tempfile = "3.27.0"
|
|
30
|
-
tree-sitter = "0.26.
|
|
31
|
-
tree-sitter-ruby = { git = "https://github.com/owayo/tree-sitter-ruby.git", tag = "v26.8.
|
|
32
|
+
tree-sitter = "0.26.12"
|
|
33
|
+
tree-sitter-ruby = { git = "https://github.com/owayo/tree-sitter-ruby.git", tag = "v26.8.103" }
|
|
32
34
|
ureq = { version = "3.4", default-features = false, features = ["native-tls"] }
|
|
33
35
|
|
|
34
36
|
[dev-dependencies]
|
|
35
37
|
assert_cmd = "2.2.2"
|
|
36
38
|
|
|
39
|
+
[build-dependencies]
|
|
40
|
+
blake3 = "1.8.6"
|
|
41
|
+
|
|
37
42
|
[profile.release]
|
|
38
43
|
lto = "thin"
|
|
39
44
|
codegen-units = 1
|
|
40
45
|
strip = true
|
|
41
46
|
|
|
42
|
-
# `cargo build --profile profiling`
|
|
43
|
-
#
|
|
47
|
+
# `cargo build --profile profiling` はサンプリングプロファイラ用のシンボルを残しつつ、
|
|
48
|
+
# `--release` と同じ最適化コードを生成する。
|
|
44
49
|
[profile.profiling]
|
|
45
50
|
inherits = "release"
|
|
46
51
|
debug = 1
|
data/NOTICE
CHANGED
|
@@ -15,9 +15,9 @@ licence position checkable rather than remembered.
|
|
|
15
15
|
not the attribution. An entry that is added late is an entry that was, for a
|
|
16
16
|
while, undocumented in a public repository.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
That inventory is now complete for what is here. The entry that used to be
|
|
19
|
+
listed as "coming" -- the spec-derived fixtures -- has landed and is recorded
|
|
20
|
+
below with the rest.
|
|
21
21
|
|
|
22
22
|
================================================================================
|
|
23
23
|
WHAT IS TAKEN
|
|
@@ -32,6 +32,18 @@ RuboCop -- https://github.com/rubocop/rubocop -- MIT
|
|
|
32
32
|
Regenerate: scripts/sync_default_yml.sh 1.89.0
|
|
33
33
|
Full text also kept at licenses/RUBOCOP.txt
|
|
34
34
|
|
|
35
|
+
tests/fixtures/upstream_spec_cases.jsonl
|
|
36
|
+
tests/fixtures/upstream_spec_divergences.jsonl
|
|
37
|
+
Input text taken out of RuboCop's own cop specs, each paired with what
|
|
38
|
+
RuboCop 1.89.0 actually reports for it. The spec text is upstream's; the
|
|
39
|
+
expectation beside it is not -- upstream was run once and its output
|
|
40
|
+
recorded, because upstream does not always behave the way its own specs
|
|
41
|
+
say. The second file holds the cases whose `-A` output does not parse as
|
|
42
|
+
Ruby, kept apart so that nothing demands this port reproduce them.
|
|
43
|
+
Regenerate: make spec-fixtures (runs upstream once per cop; needs the
|
|
44
|
+
rubocop gem, which the test run itself does not)
|
|
45
|
+
Read by tests/spec_fixtures.rs
|
|
46
|
+
|
|
35
47
|
Ruby on Rails -- https://github.com/rails/rails -- MIT
|
|
36
48
|
Copyright (c) David Heinemeier Hansson
|
|
37
49
|
|