rubocop 1.75.8 → 1.81.7
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/README.md +20 -16
 - data/config/default.yml +121 -28
 - data/config/obsoletion.yml +6 -3
 - data/exe/rubocop +1 -8
 - data/lib/rubocop/cli/command/auto_generate_config.rb +2 -2
 - data/lib/rubocop/cli.rb +18 -3
 - data/lib/rubocop/config_loader.rb +4 -39
 - data/lib/rubocop/config_loader_resolver.rb +5 -4
 - data/lib/rubocop/config_store.rb +5 -0
 - data/lib/rubocop/cop/autocorrect_logic.rb +4 -4
 - data/lib/rubocop/cop/bundler/ordered_gems.rb +1 -1
 - data/lib/rubocop/cop/correctors/alignment_corrector.rb +7 -4
 - data/lib/rubocop/cop/correctors/for_to_each_corrector.rb +7 -2
 - data/lib/rubocop/cop/correctors/parentheses_corrector.rb +5 -2
 - data/lib/rubocop/cop/gemspec/attribute_assignment.rb +91 -0
 - data/lib/rubocop/cop/gemspec/duplicated_assignment.rb +0 -22
 - data/lib/rubocop/cop/gemspec/ordered_dependencies.rb +1 -1
 - data/lib/rubocop/cop/gemspec/require_mfa.rb +15 -1
 - data/lib/rubocop/cop/internal_affairs/example_description.rb +1 -1
 - data/lib/rubocop/cop/internal_affairs/node_matcher_directive.rb +4 -4
 - data/lib/rubocop/cop/internal_affairs/node_pattern_groups.rb +4 -1
 - data/lib/rubocop/cop/internal_affairs/node_type_group.rb +3 -2
 - data/lib/rubocop/cop/internal_affairs/on_send_without_on_csend.rb +1 -1
 - data/lib/rubocop/cop/internal_affairs/useless_restrict_on_send.rb +1 -1
 - data/lib/rubocop/cop/layout/class_structure.rb +1 -1
 - data/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb +1 -1
 - data/lib/rubocop/cop/layout/dot_position.rb +1 -1
 - data/lib/rubocop/cop/layout/empty_line_between_defs.rb +30 -12
 - data/lib/rubocop/cop/layout/empty_lines_after_module_inclusion.rb +101 -0
 - data/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb +1 -1
 - data/lib/rubocop/cop/layout/empty_lines_around_arguments.rb +8 -29
 - data/lib/rubocop/cop/layout/empty_lines_around_class_body.rb +1 -1
 - data/lib/rubocop/cop/layout/hash_alignment.rb +2 -5
 - data/lib/rubocop/cop/layout/line_length.rb +35 -6
 - data/lib/rubocop/cop/layout/multiline_operation_indentation.rb +8 -4
 - data/lib/rubocop/cop/layout/rescue_ensure_alignment.rb +8 -0
 - data/lib/rubocop/cop/layout/space_around_keyword.rb +6 -1
 - data/lib/rubocop/cop/layout/space_around_operators.rb +8 -0
 - data/lib/rubocop/cop/layout/space_before_brackets.rb +2 -9
 - data/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb +7 -2
 - data/lib/rubocop/cop/layout/trailing_whitespace.rb +1 -1
 - data/lib/rubocop/cop/lint/ambiguous_range.rb +5 -0
 - data/lib/rubocop/cop/lint/constant_overwritten_in_rescue.rb +3 -2
 - data/lib/rubocop/cop/lint/cop_directive_syntax.rb +13 -7
 - data/lib/rubocop/cop/lint/debugger.rb +0 -2
 - data/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb +4 -1
 - data/lib/rubocop/cop/lint/duplicate_methods.rb +25 -4
 - data/lib/rubocop/cop/lint/duplicate_regexp_character_class_element.rb +5 -42
 - data/lib/rubocop/cop/lint/empty_interpolation.rb +14 -1
 - data/lib/rubocop/cop/lint/float_comparison.rb +4 -4
 - data/lib/rubocop/cop/lint/identity_comparison.rb +19 -15
 - data/lib/rubocop/cop/lint/literal_as_condition.rb +34 -28
 - data/lib/rubocop/cop/lint/missing_cop_enable_directive.rb +17 -8
 - data/lib/rubocop/cop/lint/numeric_operation_with_constant_result.rb +1 -0
 - data/lib/rubocop/cop/lint/redundant_regexp_quantifiers.rb +1 -1
 - data/lib/rubocop/cop/lint/redundant_safe_navigation.rb +101 -2
 - data/lib/rubocop/cop/lint/redundant_type_conversion.rb +4 -4
 - data/lib/rubocop/cop/lint/require_range_parentheses.rb +1 -1
 - data/lib/rubocop/cop/lint/rescue_exception.rb +1 -4
 - data/lib/rubocop/cop/lint/rescue_type.rb +1 -1
 - data/lib/rubocop/cop/lint/safe_navigation_chain.rb +4 -4
 - data/lib/rubocop/cop/lint/self_assignment.rb +31 -5
 - data/lib/rubocop/cop/lint/shadowed_argument.rb +7 -7
 - data/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb +5 -0
 - data/lib/rubocop/cop/lint/uri_escape_unescape.rb +2 -0
 - data/lib/rubocop/cop/lint/useless_access_modifier.rb +29 -4
 - data/lib/rubocop/cop/lint/useless_default_value_argument.rb +90 -0
 - data/lib/rubocop/cop/lint/useless_numeric_operation.rb +1 -0
 - data/lib/rubocop/cop/lint/useless_or.rb +98 -0
 - data/lib/rubocop/cop/lint/useless_ruby2_keywords.rb +3 -3
 - data/lib/rubocop/cop/lint/utils/nil_receiver_checker.rb +121 -0
 - data/lib/rubocop/cop/lint/void.rb +7 -0
 - data/lib/rubocop/cop/message_annotator.rb +1 -1
 - data/lib/rubocop/cop/mixin/alignment.rb +1 -1
 - data/lib/rubocop/cop/mixin/check_line_breakable.rb +1 -1
 - data/lib/rubocop/cop/mixin/end_keyword_alignment.rb +1 -7
 - data/lib/rubocop/cop/mixin/frozen_string_literal.rb +1 -1
 - data/lib/rubocop/cop/mixin/gemspec_help.rb +22 -0
 - data/lib/rubocop/cop/mixin/line_length_help.rb +24 -8
 - data/lib/rubocop/cop/mixin/ordered_gem_node.rb +1 -1
 - data/lib/rubocop/cop/mixin/trailing_comma.rb +1 -1
 - data/lib/rubocop/cop/naming/file_name.rb +2 -2
 - data/lib/rubocop/cop/naming/method_name.rb +129 -13
 - data/lib/rubocop/cop/naming/predicate_method.rb +319 -0
 - data/lib/rubocop/cop/naming/{predicate_name.rb → predicate_prefix.rb} +4 -4
 - data/lib/rubocop/cop/security/eval.rb +2 -1
 - data/lib/rubocop/cop/security/json_load.rb +33 -11
 - data/lib/rubocop/cop/security/open.rb +1 -0
 - data/lib/rubocop/cop/style/access_modifier_declarations.rb +1 -1
 - data/lib/rubocop/cop/style/accessor_grouping.rb +13 -1
 - data/lib/rubocop/cop/style/arguments_forwarding.rb +11 -17
 - data/lib/rubocop/cop/style/array_intersect.rb +99 -35
 - data/lib/rubocop/cop/style/array_intersect_with_single_element.rb +47 -0
 - data/lib/rubocop/cop/style/bitwise_predicate.rb +8 -1
 - data/lib/rubocop/cop/style/block_delimiters.rb +1 -1
 - data/lib/rubocop/cop/style/case_like_if.rb +1 -1
 - data/lib/rubocop/cop/style/collection_querying.rb +167 -0
 - data/lib/rubocop/cop/style/conditional_assignment.rb +11 -5
 - data/lib/rubocop/cop/style/constant_visibility.rb +14 -9
 - data/lib/rubocop/cop/style/dig_chain.rb +1 -1
 - data/lib/rubocop/cop/style/double_negation.rb +1 -1
 - data/lib/rubocop/cop/style/empty_string_inside_interpolation.rb +100 -0
 - data/lib/rubocop/cop/style/endless_method.rb +15 -2
 - data/lib/rubocop/cop/style/explicit_block_argument.rb +1 -1
 - data/lib/rubocop/cop/style/exponential_notation.rb +3 -2
 - data/lib/rubocop/cop/style/fetch_env_var.rb +32 -6
 - data/lib/rubocop/cop/style/float_division.rb +15 -1
 - data/lib/rubocop/cop/style/hash_conversion.rb +16 -8
 - data/lib/rubocop/cop/style/hash_syntax.rb +1 -1
 - data/lib/rubocop/cop/style/if_unless_modifier.rb +13 -6
 - data/lib/rubocop/cop/style/infinite_loop.rb +1 -1
 - data/lib/rubocop/cop/style/inverse_methods.rb +1 -1
 - data/lib/rubocop/cop/style/it_assignment.rb +69 -12
 - data/lib/rubocop/cop/style/it_block_parameter.rb +36 -15
 - data/lib/rubocop/cop/style/map_to_hash.rb +1 -3
 - data/lib/rubocop/cop/style/map_to_set.rb +1 -3
 - data/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb +4 -6
 - data/lib/rubocop/cop/style/method_call_with_args_parentheses.rb +16 -0
 - data/lib/rubocop/cop/style/min_max_comparison.rb +13 -5
 - data/lib/rubocop/cop/style/nil_comparison.rb +9 -7
 - data/lib/rubocop/cop/style/one_line_conditional.rb +17 -9
 - data/lib/rubocop/cop/style/parallel_assignment.rb +32 -20
 - data/lib/rubocop/cop/style/redundant_array_flatten.rb +50 -0
 - data/lib/rubocop/cop/style/redundant_begin.rb +34 -0
 - data/lib/rubocop/cop/style/redundant_condition.rb +1 -1
 - data/lib/rubocop/cop/style/redundant_exception.rb +1 -1
 - data/lib/rubocop/cop/style/redundant_fetch_block.rb +1 -9
 - data/lib/rubocop/cop/style/redundant_format.rb +26 -5
 - data/lib/rubocop/cop/style/redundant_freeze.rb +1 -1
 - data/lib/rubocop/cop/style/redundant_interpolation.rb +12 -3
 - data/lib/rubocop/cop/style/redundant_line_continuation.rb +1 -1
 - data/lib/rubocop/cop/style/redundant_parentheses.rb +55 -16
 - data/lib/rubocop/cop/style/redundant_regexp_argument.rb +4 -0
 - data/lib/rubocop/cop/style/redundant_regexp_escape.rb +8 -0
 - data/lib/rubocop/cop/style/redundant_self.rb +8 -5
 - data/lib/rubocop/cop/style/safe_navigation.rb +44 -12
 - data/lib/rubocop/cop/style/semicolon.rb +23 -7
 - data/lib/rubocop/cop/style/single_line_methods.rb +7 -4
 - data/lib/rubocop/cop/style/sole_nested_conditional.rb +40 -3
 - data/lib/rubocop/cop/style/stabby_lambda_parentheses.rb +1 -1
 - data/lib/rubocop/cop/style/string_concatenation.rb +17 -13
 - data/lib/rubocop/cop/style/symbol_array.rb +1 -1
 - data/lib/rubocop/cop/style/symbol_proc.rb +1 -1
 - data/lib/rubocop/cop/style/trailing_comma_in_arguments.rb +45 -0
 - data/lib/rubocop/cop/style/trailing_comma_in_block_args.rb +1 -1
 - data/lib/rubocop/cop/style/unless_else.rb +10 -9
 - data/lib/rubocop/cop/utils/format_string.rb +10 -0
 - data/lib/rubocop/cop/variable_force/variable.rb +1 -1
 - data/lib/rubocop/cop/variable_force.rb +25 -8
 - data/lib/rubocop/cops_documentation_generator.rb +5 -4
 - data/lib/rubocop/formatter/disabled_config_formatter.rb +18 -5
 - data/lib/rubocop/formatter/fuubar_style_formatter.rb +1 -1
 - data/lib/rubocop/formatter/markdown_formatter.rb +1 -0
 - data/lib/rubocop/formatter/offense_count_formatter.rb +1 -1
 - data/lib/rubocop/formatter/pacman_formatter.rb +1 -0
 - data/lib/rubocop/lsp/diagnostic.rb +25 -24
 - data/lib/rubocop/lsp/routes.rb +65 -9
 - data/lib/rubocop/lsp/runtime.rb +2 -2
 - data/lib/rubocop/lsp/server.rb +2 -2
 - data/lib/rubocop/lsp/stdin_runner.rb +0 -16
 - data/lib/rubocop/pending_cops_reporter.rb +56 -0
 - data/lib/rubocop/result_cache.rb +14 -12
 - data/lib/rubocop/rspec/expect_offense.rb +9 -3
 - data/lib/rubocop/runner.rb +6 -4
 - data/lib/rubocop/server/cache.rb +4 -2
 - data/lib/rubocop/server/client_command/base.rb +10 -0
 - data/lib/rubocop/server/client_command/exec.rb +2 -1
 - data/lib/rubocop/server/client_command/start.rb +11 -1
 - data/lib/rubocop/target_finder.rb +9 -9
 - data/lib/rubocop/target_ruby.rb +10 -1
 - data/lib/rubocop/version.rb +1 -1
 - data/lib/rubocop.rb +12 -1
 - data/lib/ruby_lsp/rubocop/addon.rb +25 -10
 - data/lib/ruby_lsp/rubocop/runtime_adapter.rb +49 -15
 - metadata +18 -7
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 8acfafa4ed4b94c367e6ef95c84d2d02f01222a1e8a813790948977476f34456
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0d2ad56c4a81da58046a098351606bfb8314f09f9e5f946ad1dd825aa70fe0f7
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ae4edea22ca7511df39ec99591df3d537bfd3fa8974d5bb461d2b1c674b48f15296f22c81b1cd9329719a68b0d3f8d36442eaa5742cbf8e0974c6e3e2e56e29c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ffce467cec50d2ed0ef7b312a15dd17e9b7fd1622b70528d12f0cfe16056ae3b5111f2d360b4e855ea5811befd092a306ff56ad091b89a6050f3354f3db205a4
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -6,8 +6,6 @@ 
     | 
|
| 
       6 
6 
     | 
    
         
             
            [](https://github.com/rubocop/rubocop)
         
     | 
| 
       7 
7 
     | 
    
         
             
            [](https://badge.fury.io/rb/rubocop)
         
     | 
| 
       8 
8 
     | 
    
         
             
            [](https://github.com/rubocop/rubocop/actions/workflows/rubocop.yml)
         
     | 
| 
       9 
     | 
    
         
            -
            [](https://codeclimate.com/github/rubocop/rubocop/test_coverage)
         
     | 
| 
       10 
     | 
    
         
            -
            [](https://codeclimate.com/github/rubocop/rubocop/maintainability)
         
     | 
| 
       11 
9 
     | 
    
         
             
            [](https://discord.gg/wJjWvGRDmm)
         
     | 
| 
       12 
10 
     | 
    
         | 
| 
       13 
11 
     | 
    
         
             
            > Role models are important. <br/>
         
     | 
| 
         @@ -36,10 +34,11 @@ Working on RuboCop is often fun, but it also requires a great deal of time and e 
     | 
|
| 
       36 
34 
     | 
    
         
             
            **RuboCop**'s installation is pretty standard:
         
     | 
| 
       37 
35 
     | 
    
         | 
| 
       38 
36 
     | 
    
         
             
            ```sh
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
      
 37 
     | 
    
         
            +
            gem install rubocop
         
     | 
| 
       40 
38 
     | 
    
         
             
            ```
         
     | 
| 
       41 
39 
     | 
    
         | 
| 
       42 
     | 
    
         
            -
            If you'd rather install RuboCop using `bundler`, add a line for it in your 
     | 
| 
      
 40 
     | 
    
         
            +
            If you'd rather install RuboCop using `bundler`, add a line for it in your
         
     | 
| 
      
 41 
     | 
    
         
            +
            `Gemfile` (but set the `require` option to `false`, as it is a standalone tool):
         
     | 
| 
       43 
42 
     | 
    
         | 
| 
       44 
43 
     | 
    
         
             
            ```rb
         
     | 
| 
       45 
44 
     | 
    
         
             
            gem 'rubocop', require: false
         
     | 
| 
         @@ -52,7 +51,7 @@ To prevent an unwanted RuboCop update you might want to use a conservative versi 
     | 
|
| 
       52 
51 
     | 
    
         
             
            in your `Gemfile`:
         
     | 
| 
       53 
52 
     | 
    
         | 
| 
       54 
53 
     | 
    
         
             
            ```rb
         
     | 
| 
       55 
     | 
    
         
            -
            gem 'rubocop', '~> 1. 
     | 
| 
      
 54 
     | 
    
         
            +
            gem 'rubocop', '~> 1.81', require: false
         
     | 
| 
       56 
55 
     | 
    
         
             
            ```
         
     | 
| 
       57 
56 
     | 
    
         | 
| 
       58 
57 
     | 
    
         
             
            See [our versioning policy](https://docs.rubocop.org/rubocop/versioning.html) for further details.
         
     | 
| 
         @@ -61,12 +60,15 @@ See [our versioning policy](https://docs.rubocop.org/rubocop/versioning.html) fo 
     | 
|
| 
       61 
60 
     | 
    
         | 
| 
       62 
61 
     | 
    
         
             
            Just type `rubocop` in a Ruby project's folder and watch the magic happen.
         
     | 
| 
       63 
62 
     | 
    
         | 
| 
       64 
     | 
    
         
            -
            ```
         
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
      
 63 
     | 
    
         
            +
            ```sh
         
     | 
| 
      
 64 
     | 
    
         
            +
            cd my/cool/ruby/project
         
     | 
| 
      
 65 
     | 
    
         
            +
            rubocop
         
     | 
| 
       67 
66 
     | 
    
         
             
            ```
         
     | 
| 
       68 
67 
     | 
    
         | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
      
 68 
     | 
    
         
            +
            > [!TIP]
         
     | 
| 
      
 69 
     | 
    
         
            +
            >
         
     | 
| 
      
 70 
     | 
    
         
            +
            > You can also use this magic in your favorite editor with RuboCop's
         
     | 
| 
      
 71 
     | 
    
         
            +
            > [built-in LSP server](https://docs.rubocop.org/rubocop/usage/lsp.html).
         
     | 
| 
       70 
72 
     | 
    
         | 
| 
       71 
73 
     | 
    
         
             
            ## Documentation
         
     | 
| 
       72 
74 
     | 
    
         | 
| 
         @@ -79,7 +81,7 @@ RuboCop officially supports the following runtime Ruby implementations: 
     | 
|
| 
       79 
81 
     | 
    
         
             
            * MRI 2.7+
         
     | 
| 
       80 
82 
     | 
    
         
             
            * JRuby 9.4+
         
     | 
| 
       81 
83 
     | 
    
         | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
      
 84 
     | 
    
         
            +
            It targets Ruby 2.0+ for code analysis.
         
     | 
| 
       83 
85 
     | 
    
         | 
| 
       84 
86 
     | 
    
         
             
            See the [compatibility documentation](https://docs.rubocop.org/rubocop/compatibility.html) for further details.
         
     | 
| 
       85 
87 
     | 
    
         | 
| 
         @@ -91,7 +93,6 @@ If you use RuboCop in your project, you can include one of these badges in your 
     | 
|
| 
       91 
93 
     | 
    
         | 
| 
       92 
94 
     | 
    
         
             
            [](https://rubystyle.guide)
         
     | 
| 
       93 
95 
     | 
    
         | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
96 
     | 
    
         
             
            Here are the Markdown snippets for the two badges:
         
     | 
| 
       96 
97 
     | 
    
         | 
| 
       97 
98 
     | 
    
         
             
            ``` markdown
         
     | 
| 
         @@ -109,7 +110,7 @@ Here's a list of RuboCop's core developers: 
     | 
|
| 
       109 
110 
     | 
    
         
             
            * [Yuji Nakayama](https://github.com/yujinakayama) (retired)
         
     | 
| 
       110 
111 
     | 
    
         
             
            * [Evgeni Dzhelyov](https://github.com/edzhelyov) (retired)
         
     | 
| 
       111 
112 
     | 
    
         
             
            * [Ted Johansson](https://github.com/drenmi)
         
     | 
| 
       112 
     | 
    
         
            -
            * [Masataka Kuwabara](https://github.com/pocke)
         
     | 
| 
      
 113 
     | 
    
         
            +
            * [Masataka Kuwabara](https://github.com/pocke) (retired)
         
     | 
| 
       113 
114 
     | 
    
         
             
            * [Koichi Ito](https://github.com/koic)
         
     | 
| 
       114 
115 
     | 
    
         
             
            * [Maxim Krizhanovski](https://github.com/darhazer)
         
     | 
| 
       115 
116 
     | 
    
         
             
            * [Benjamin Quorning](https://github.com/bquorning)
         
     | 
| 
         @@ -157,8 +158,8 @@ wide array of funding channels to account for your preferences 
     | 
|
| 
       157 
158 
     | 
    
         
             
            currently [Open Collective](https://opencollective.com/rubocop) is our
         
     | 
| 
       158 
159 
     | 
    
         
             
            preferred funding platform).
         
     | 
| 
       159 
160 
     | 
    
         | 
| 
       160 
     | 
    
         
            -
            **If you're working in a company that's making significant use of RuboCop we'd 
     | 
| 
       161 
     | 
    
         
            -
            to become a RuboCop sponsor.**
         
     | 
| 
      
 161 
     | 
    
         
            +
            **If you're working in a company that's making significant use of RuboCop we'd
         
     | 
| 
      
 162 
     | 
    
         
            +
            appreciate it if you suggest to your company to become a RuboCop sponsor.**
         
     | 
| 
       162 
163 
     | 
    
         | 
| 
       163 
164 
     | 
    
         
             
            You can support the development of RuboCop via
         
     | 
| 
       164 
165 
     | 
    
         
             
            [GitHub Sponsors](https://github.com/sponsors/bbatsov),
         
     | 
| 
         @@ -168,8 +169,11 @@ You can support the development of RuboCop via 
     | 
|
| 
       168 
169 
     | 
    
         
             
            and [Tidelift](https://tidelift.com/subscription/pkg/rubygems-rubocop?utm_source=rubygems-rubocop&utm_medium=referral&utm_campaign=readme)
         
     | 
| 
       169 
170 
     | 
    
         
             
            .
         
     | 
| 
       170 
171 
     | 
    
         | 
| 
       171 
     | 
    
         
            -
             
     | 
| 
       172 
     | 
    
         
            -
             
     | 
| 
      
 172 
     | 
    
         
            +
            > [!NOTE]
         
     | 
| 
      
 173 
     | 
    
         
            +
            >
         
     | 
| 
      
 174 
     | 
    
         
            +
            > If doing a sponsorship in the form of donation is problematic for your company
         
     | 
| 
      
 175 
     | 
    
         
            +
            > from an accounting standpoint, we'd recommend the use of Tidelift, where you
         
     | 
| 
      
 176 
     | 
    
         
            +
            > can get a support-like subscription instead.
         
     | 
| 
       173 
177 
     | 
    
         | 
| 
       174 
178 
     | 
    
         
             
            ### Open Collective for Individuals
         
     | 
| 
       175 
179 
     | 
    
         | 
    
        data/config/default.yml
    CHANGED
    
    | 
         @@ -275,12 +275,19 @@ Gemspec/AddRuntimeDependency: 
     | 
|
| 
       275 
275 
     | 
    
         
             
              Description: 'Prefer `add_dependency` over `add_runtime_dependency`.'
         
     | 
| 
       276 
276 
     | 
    
         
             
              StyleGuide: '#add_dependency_vs_add_runtime_dependency'
         
     | 
| 
       277 
277 
     | 
    
         
             
              References:
         
     | 
| 
       278 
     | 
    
         
            -
                - https://github.com/ 
     | 
| 
      
 278 
     | 
    
         
            +
                - https://github.com/ruby/rubygems/issues/7799#issuecomment-2192720316
         
     | 
| 
       279 
279 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       280 
280 
     | 
    
         
             
              VersionAdded: '1.65'
         
     | 
| 
       281 
281 
     | 
    
         
             
              Include:
         
     | 
| 
       282 
282 
     | 
    
         
             
                - '**/*.gemspec'
         
     | 
| 
       283 
283 
     | 
    
         | 
| 
      
 284 
     | 
    
         
            +
            Gemspec/AttributeAssignment:
         
     | 
| 
      
 285 
     | 
    
         
            +
              Description: 'Use consistent style for Gemspec attributes assignment.'
         
     | 
| 
      
 286 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 287 
     | 
    
         
            +
              VersionAdded: '1.77'
         
     | 
| 
      
 288 
     | 
    
         
            +
              Include:
         
     | 
| 
      
 289 
     | 
    
         
            +
                - '**/*.gemspec'
         
     | 
| 
      
 290 
     | 
    
         
            +
             
     | 
| 
       284 
291 
     | 
    
         
             
            Gemspec/DependencyVersion:
         
     | 
| 
       285 
292 
     | 
    
         
             
              Description: 'Requires or forbids specifying gem dependency versions.'
         
     | 
| 
       286 
293 
     | 
    
         
             
              Enabled: false
         
     | 
| 
         @@ -371,7 +378,7 @@ Gemspec/RubyVersionGlobalsUsage: 
     | 
|
| 
       371 
378 
     | 
    
         
             
            #################### Layout ###########################
         
     | 
| 
       372 
379 
     | 
    
         | 
| 
       373 
380 
     | 
    
         
             
            Layout/AccessModifierIndentation:
         
     | 
| 
       374 
     | 
    
         
            -
              Description:  
     | 
| 
      
 381 
     | 
    
         
            +
              Description: Checks indentation of private/protected visibility modifiers.
         
     | 
| 
       375 
382 
     | 
    
         
             
              StyleGuide: '#indent-public-private-protected'
         
     | 
| 
       376 
383 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       377 
384 
     | 
    
         
             
              VersionAdded: '0.49'
         
     | 
| 
         @@ -631,6 +638,12 @@ Layout/EmptyLines: 
     | 
|
| 
       631 
638 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       632 
639 
     | 
    
         
             
              VersionAdded: '0.49'
         
     | 
| 
       633 
640 
     | 
    
         | 
| 
      
 641 
     | 
    
         
            +
            Layout/EmptyLinesAfterModuleInclusion:
         
     | 
| 
      
 642 
     | 
    
         
            +
              Description: 'Keeps track of empty lines after module inclusion methods.'
         
     | 
| 
      
 643 
     | 
    
         
            +
              StyleGuide: '#empty-lines-after-module-inclusion'
         
     | 
| 
      
 644 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 645 
     | 
    
         
            +
              VersionAdded: '1.79'
         
     | 
| 
      
 646 
     | 
    
         
            +
             
     | 
| 
       634 
647 
     | 
    
         
             
            Layout/EmptyLinesAroundAccessModifier:
         
     | 
| 
       635 
648 
     | 
    
         
             
              Description: "Keep blank lines around access modifiers."
         
     | 
| 
       636 
649 
     | 
    
         
             
              StyleGuide: '#empty-lines-around-access-modifier'
         
     | 
| 
         @@ -1044,7 +1057,7 @@ Layout/LeadingCommentSpace: 
     | 
|
| 
       1044 
1057 
     | 
    
         
             
              AllowSteepAnnotation: false
         
     | 
| 
       1045 
1058 
     | 
    
         | 
| 
       1046 
1059 
     | 
    
         
             
            Layout/LeadingEmptyLines:
         
     | 
| 
       1047 
     | 
    
         
            -
              Description:  
     | 
| 
      
 1060 
     | 
    
         
            +
              Description: Checks for unnecessary blank lines at the beginning of a file.
         
     | 
| 
       1048 
1061 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1049 
1062 
     | 
    
         
             
              VersionAdded: '0.57'
         
     | 
| 
       1050 
1063 
     | 
    
         
             
              VersionChanged: '0.77'
         
     | 
| 
         @@ -1095,6 +1108,7 @@ Layout/LineLength: 
     | 
|
| 
       1095 
1108 
     | 
    
         
             
              # To make it possible to copy or click on URIs in the code, we allow lines
         
     | 
| 
       1096 
1109 
     | 
    
         
             
              # containing a URI to be longer than Max.
         
     | 
| 
       1097 
1110 
     | 
    
         
             
              AllowURI: true
         
     | 
| 
      
 1111 
     | 
    
         
            +
              AllowQualifiedName: true
         
     | 
| 
       1098 
1112 
     | 
    
         
             
              URISchemes:
         
     | 
| 
       1099 
1113 
     | 
    
         
             
                - http
         
     | 
| 
       1100 
1114 
     | 
    
         
             
                - https
         
     | 
| 
         @@ -1133,7 +1147,7 @@ Layout/MultilineArrayLineBreaks: 
     | 
|
| 
       1133 
1147 
     | 
    
         
             
              AllowMultilineFinalElement: false
         
     | 
| 
       1134 
1148 
     | 
    
         | 
| 
       1135 
1149 
     | 
    
         
             
            Layout/MultilineAssignmentLayout:
         
     | 
| 
       1136 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1150 
     | 
    
         
            +
              Description: 'Checks for a newline after the assignment operator in multi-line assignments.'
         
     | 
| 
       1137 
1151 
     | 
    
         
             
              StyleGuide: '#indent-conditional-assignment'
         
     | 
| 
       1138 
1152 
     | 
    
         
             
              Enabled: false
         
     | 
| 
       1139 
1153 
     | 
    
         
             
              VersionAdded: '0.49'
         
     | 
| 
         @@ -1647,7 +1661,7 @@ Lint/BinaryOperatorWithIdenticalOperands: 
     | 
|
| 
       1647 
1661 
     | 
    
         
             
              VersionChanged: '1.69'
         
     | 
| 
       1648 
1662 
     | 
    
         | 
| 
       1649 
1663 
     | 
    
         
             
            Lint/BooleanSymbol:
         
     | 
| 
       1650 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1664 
     | 
    
         
            +
              Description: 'Checks for `:true` and `:false` symbols.'
         
     | 
| 
       1651 
1665 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1652 
1666 
     | 
    
         
             
              SafeAutoCorrect: false
         
     | 
| 
       1653 
1667 
     | 
    
         
             
              VersionAdded: '0.50'
         
     | 
| 
         @@ -1680,7 +1694,7 @@ Lint/ConstantReassignment: 
     | 
|
| 
       1680 
1694 
     | 
    
         
             
              VersionAdded: '1.70'
         
     | 
| 
       1681 
1695 
     | 
    
         | 
| 
       1682 
1696 
     | 
    
         
             
            Lint/ConstantResolution:
         
     | 
| 
       1683 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1697 
     | 
    
         
            +
              Description: 'Checks that constants are fully qualified with `::`.'
         
     | 
| 
       1684 
1698 
     | 
    
         
             
              Enabled: false
         
     | 
| 
       1685 
1699 
     | 
    
         
             
              VersionAdded: '0.86'
         
     | 
| 
       1686 
1700 
     | 
    
         
             
              # Restrict this cop to only looking at certain names
         
     | 
| 
         @@ -1694,7 +1708,7 @@ Lint/CopDirectiveSyntax: 
     | 
|
| 
       1694 
1708 
     | 
    
         
             
              VersionAdded: '1.72'
         
     | 
| 
       1695 
1709 
     | 
    
         | 
| 
       1696 
1710 
     | 
    
         
             
            Lint/Debugger:
         
     | 
| 
       1697 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1711 
     | 
    
         
            +
              Description: 'Checks for debugger calls.'
         
     | 
| 
       1698 
1712 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1699 
1713 
     | 
    
         
             
              VersionAdded: '0.14'
         
     | 
| 
       1700 
1714 
     | 
    
         
             
              VersionChanged: '1.63'
         
     | 
| 
         @@ -1745,7 +1759,7 @@ Lint/Debugger: 
     | 
|
| 
       1745 
1759 
     | 
    
         
             
                  - debug/start
         
     | 
| 
       1746 
1760 
     | 
    
         | 
| 
       1747 
1761 
     | 
    
         
             
            Lint/DeprecatedClassMethods:
         
     | 
| 
       1748 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1762 
     | 
    
         
            +
              Description: 'Checks for deprecated class method calls.'
         
     | 
| 
       1749 
1763 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1750 
1764 
     | 
    
         
             
              VersionAdded: '0.19'
         
     | 
| 
       1751 
1765 
     | 
    
         | 
| 
         @@ -1819,13 +1833,13 @@ Lint/DuplicateElsifCondition: 
     | 
|
| 
       1819 
1833 
     | 
    
         
             
              VersionAdded: '0.88'
         
     | 
| 
       1820 
1834 
     | 
    
         | 
| 
       1821 
1835 
     | 
    
         
             
            Lint/DuplicateHashKey:
         
     | 
| 
       1822 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1836 
     | 
    
         
            +
              Description: 'Checks for duplicate keys in hash literals.'
         
     | 
| 
       1823 
1837 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1824 
1838 
     | 
    
         
             
              VersionAdded: '0.34'
         
     | 
| 
       1825 
1839 
     | 
    
         
             
              VersionChanged: '0.77'
         
     | 
| 
       1826 
1840 
     | 
    
         | 
| 
       1827 
1841 
     | 
    
         
             
            Lint/DuplicateMagicComment:
         
     | 
| 
       1828 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1842 
     | 
    
         
            +
              Description: 'Checks for duplicated magic comments.'
         
     | 
| 
       1829 
1843 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       1830 
1844 
     | 
    
         
             
              VersionAdded: '1.37'
         
     | 
| 
       1831 
1845 
     | 
    
         | 
| 
         @@ -1835,7 +1849,7 @@ Lint/DuplicateMatchPattern: 
     | 
|
| 
       1835 
1849 
     | 
    
         
             
              VersionAdded: '1.50'
         
     | 
| 
       1836 
1850 
     | 
    
         | 
| 
       1837 
1851 
     | 
    
         
             
            Lint/DuplicateMethods:
         
     | 
| 
       1838 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1852 
     | 
    
         
            +
              Description: 'Checks for duplicate method definitions.'
         
     | 
| 
       1839 
1853 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1840 
1854 
     | 
    
         
             
              VersionAdded: '0.29'
         
     | 
| 
       1841 
1855 
     | 
    
         | 
| 
         @@ -1845,7 +1859,7 @@ Lint/DuplicateRegexpCharacterClassElement: 
     | 
|
| 
       1845 
1859 
     | 
    
         
             
              VersionAdded: '1.1'
         
     | 
| 
       1846 
1860 
     | 
    
         | 
| 
       1847 
1861 
     | 
    
         
             
            Lint/DuplicateRequire:
         
     | 
| 
       1848 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1862 
     | 
    
         
            +
              Description: 'Checks for duplicate `require`s and `require_relative`s.'
         
     | 
| 
       1849 
1863 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1850 
1864 
     | 
    
         
             
              SafeAutoCorrect: false
         
     | 
| 
       1851 
1865 
     | 
    
         
             
              VersionAdded: '0.90'
         
     | 
| 
         @@ -1862,12 +1876,12 @@ Lint/DuplicateSetElement: 
     | 
|
| 
       1862 
1876 
     | 
    
         
             
              VersionAdded: '1.67'
         
     | 
| 
       1863 
1877 
     | 
    
         | 
| 
       1864 
1878 
     | 
    
         
             
            Lint/EachWithObjectArgument:
         
     | 
| 
       1865 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1879 
     | 
    
         
            +
              Description: 'Checks for immutable argument given to each_with_object.'
         
     | 
| 
       1866 
1880 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1867 
1881 
     | 
    
         
             
              VersionAdded: '0.31'
         
     | 
| 
       1868 
1882 
     | 
    
         | 
| 
       1869 
1883 
     | 
    
         
             
            Lint/ElseLayout:
         
     | 
| 
       1870 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 1884 
     | 
    
         
            +
              Description: 'Checks for odd code arrangement in an else block.'
         
     | 
| 
       1871 
1885 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1872 
1886 
     | 
    
         
             
              VersionAdded: '0.17'
         
     | 
| 
       1873 
1887 
     | 
    
         
             
              VersionChanged: '1.2'
         
     | 
| 
         @@ -1923,7 +1937,7 @@ Lint/EmptyInterpolation: 
     | 
|
| 
       1923 
1937 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       1924 
1938 
     | 
    
         
             
              AutoCorrect: contextual
         
     | 
| 
       1925 
1939 
     | 
    
         
             
              VersionAdded: '0.20'
         
     | 
| 
       1926 
     | 
    
         
            -
              VersionChanged: '1. 
     | 
| 
      
 1940 
     | 
    
         
            +
              VersionChanged: '1.76'
         
     | 
| 
       1927 
1941 
     | 
    
         | 
| 
       1928 
1942 
     | 
    
         
             
            Lint/EmptyWhen:
         
     | 
| 
       1929 
1943 
     | 
    
         
             
              Description: 'Checks for `when` branches with empty bodies.'
         
     | 
| 
         @@ -2270,6 +2284,7 @@ Lint/RedundantSafeNavigation: 
     | 
|
| 
       2270 
2284 
     | 
    
         
             
              Description: 'Checks for redundant safe navigation calls.'
         
     | 
| 
       2271 
2285 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       2272 
2286 
     | 
    
         
             
              VersionAdded: '0.93'
         
     | 
| 
      
 2287 
     | 
    
         
            +
              VersionChanged: '1.79'
         
     | 
| 
       2273 
2288 
     | 
    
         
             
              AllowedMethods:
         
     | 
| 
       2274 
2289 
     | 
    
         
             
                - instance_of?
         
     | 
| 
       2275 
2290 
     | 
    
         
             
                - kind_of?
         
     | 
| 
         @@ -2277,6 +2292,12 @@ Lint/RedundantSafeNavigation: 
     | 
|
| 
       2277 
2292 
     | 
    
         
             
                - eql?
         
     | 
| 
       2278 
2293 
     | 
    
         
             
                - respond_to?
         
     | 
| 
       2279 
2294 
     | 
    
         
             
                - equal?
         
     | 
| 
      
 2295 
     | 
    
         
            +
              InferNonNilReceiver: false
         
     | 
| 
      
 2296 
     | 
    
         
            +
              AdditionalNilMethods:
         
     | 
| 
      
 2297 
     | 
    
         
            +
                - present?
         
     | 
| 
      
 2298 
     | 
    
         
            +
                - blank?
         
     | 
| 
      
 2299 
     | 
    
         
            +
                - try
         
     | 
| 
      
 2300 
     | 
    
         
            +
                - try!
         
     | 
| 
       2280 
2301 
     | 
    
         
             
              Safe: false
         
     | 
| 
       2281 
2302 
     | 
    
         | 
| 
       2282 
2303 
     | 
    
         
             
            Lint/RedundantSplatExpansion:
         
     | 
| 
         @@ -2400,6 +2421,7 @@ Lint/SelfAssignment: 
     | 
|
| 
       2400 
2421 
     | 
    
         
             
              Description: 'Checks for self-assignments.'
         
     | 
| 
       2401 
2422 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       2402 
2423 
     | 
    
         
             
              VersionAdded: '0.89'
         
     | 
| 
      
 2424 
     | 
    
         
            +
              AllowRBSInlineAnnotation: false
         
     | 
| 
       2403 
2425 
     | 
    
         | 
| 
       2404 
2426 
     | 
    
         
             
            Lint/SendWithMixinArgument:
         
     | 
| 
       2405 
2427 
     | 
    
         
             
              Description: 'Checks for `send` method when using mixin.'
         
     | 
| 
         @@ -2423,8 +2445,9 @@ Lint/ShadowingOuterLocalVariable: 
     | 
|
| 
       2423 
2445 
     | 
    
         
             
              Description: >-
         
     | 
| 
       2424 
2446 
     | 
    
         
             
                             Do not use the same name as outer local variable
         
     | 
| 
       2425 
2447 
     | 
    
         
             
                             for block arguments or block local variables.
         
     | 
| 
       2426 
     | 
    
         
            -
              Enabled:  
     | 
| 
      
 2448 
     | 
    
         
            +
              Enabled: false
         
     | 
| 
       2427 
2449 
     | 
    
         
             
              VersionAdded: '0.9'
         
     | 
| 
      
 2450 
     | 
    
         
            +
              VersionChanged: '1.76'
         
     | 
| 
       2428 
2451 
     | 
    
         | 
| 
       2429 
2452 
     | 
    
         
             
            Lint/SharedMutableDefault:
         
     | 
| 
       2430 
2453 
     | 
    
         
             
              Description: 'Checks for mutable literals used as default arguments during Hash initialization.'
         
     | 
| 
         @@ -2612,6 +2635,13 @@ Lint/UselessConstantScoping: 
     | 
|
| 
       2612 
2635 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       2613 
2636 
     | 
    
         
             
              VersionAdded: '1.72'
         
     | 
| 
       2614 
2637 
     | 
    
         | 
| 
      
 2638 
     | 
    
         
            +
            Lint/UselessDefaultValueArgument:
         
     | 
| 
      
 2639 
     | 
    
         
            +
              Description: 'Checks for usage of `fetch` or `Array.new` with default value argument and block.'
         
     | 
| 
      
 2640 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 2641 
     | 
    
         
            +
              VersionAdded: '1.76'
         
     | 
| 
      
 2642 
     | 
    
         
            +
              Safe: false
         
     | 
| 
      
 2643 
     | 
    
         
            +
              AllowedReceivers: []
         
     | 
| 
      
 2644 
     | 
    
         
            +
             
     | 
| 
       2615 
2645 
     | 
    
         
             
            Lint/UselessDefined:
         
     | 
| 
       2616 
2646 
     | 
    
         
             
              Description: 'Checks for calls to `defined?` with strings and symbols. The result of such a call will always be truthy.'
         
     | 
| 
       2617 
2647 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
         @@ -2636,6 +2666,11 @@ Lint/UselessNumericOperation: 
     | 
|
| 
       2636 
2666 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       2637 
2667 
     | 
    
         
             
              VersionAdded: '1.66'
         
     | 
| 
       2638 
2668 
     | 
    
         | 
| 
      
 2669 
     | 
    
         
            +
            Lint/UselessOr:
         
     | 
| 
      
 2670 
     | 
    
         
            +
              Description: 'Checks for useless OR expressions.'
         
     | 
| 
      
 2671 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 2672 
     | 
    
         
            +
              VersionAdded: '1.76'
         
     | 
| 
      
 2673 
     | 
    
         
            +
             
     | 
| 
       2639 
2674 
     | 
    
         
             
            Lint/UselessRescue:
         
     | 
| 
       2640 
2675 
     | 
    
         
             
              Description: 'Checks for useless `rescue`s.'
         
     | 
| 
       2641 
2676 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
         @@ -2676,7 +2711,7 @@ Metrics/AbcSize: 
     | 
|
| 
       2676 
2711 
     | 
    
         
             
                             A calculated magnitude based on number of assignments,
         
     | 
| 
       2677 
2712 
     | 
    
         
             
                             branches, and conditions.
         
     | 
| 
       2678 
2713 
     | 
    
         
             
              References:
         
     | 
| 
       2679 
     | 
    
         
            -
                -  
     | 
| 
      
 2714 
     | 
    
         
            +
                - https://wiki.c2.com/?AbcMetric
         
     | 
| 
       2680 
2715 
     | 
    
         
             
                - https://en.wikipedia.org/wiki/ABC_Software_Metric
         
     | 
| 
       2681 
2716 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       2682 
2717 
     | 
    
         
             
              VersionAdded: '0.27'
         
     | 
| 
         @@ -2795,7 +2830,7 @@ Migration/DepartmentName: 
     | 
|
| 
       2795 
2830 
     | 
    
         
             
            #################### Naming ##############################
         
     | 
| 
       2796 
2831 
     | 
    
         | 
| 
       2797 
2832 
     | 
    
         
             
            Naming/AccessorMethodName:
         
     | 
| 
       2798 
     | 
    
         
            -
              Description:  
     | 
| 
      
 2833 
     | 
    
         
            +
              Description: Checks the naming of accessor methods for get_/set_.
         
     | 
| 
       2799 
2834 
     | 
    
         
             
              StyleGuide: '#accessor_mutator_method_names'
         
     | 
| 
       2800 
2835 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       2801 
2836 
     | 
    
         
             
              VersionAdded: '0.50'
         
     | 
| 
         @@ -3046,8 +3081,26 @@ Naming/MethodParameterName: 
     | 
|
| 
       3046 
3081 
     | 
    
         
             
              # Forbidden names that will register an offense
         
     | 
| 
       3047 
3082 
     | 
    
         
             
              ForbiddenNames: []
         
     | 
| 
       3048 
3083 
     | 
    
         | 
| 
       3049 
     | 
    
         
            -
            Naming/ 
     | 
| 
       3050 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 3084 
     | 
    
         
            +
            Naming/PredicateMethod:
         
     | 
| 
      
 3085 
     | 
    
         
            +
              Description: 'Checks that predicate methods end with `?` and non-predicate methods do not.'
         
     | 
| 
      
 3086 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 3087 
     | 
    
         
            +
              VersionAdded: '1.76'
         
     | 
| 
      
 3088 
     | 
    
         
            +
              VersionChanged: '1.78'
         
     | 
| 
      
 3089 
     | 
    
         
            +
              # In `aggressive` mode, the cop will register an offense for predicate methods that
         
     | 
| 
      
 3090 
     | 
    
         
            +
              #   may return a non-boolean value.
         
     | 
| 
      
 3091 
     | 
    
         
            +
              # In `conservative` mode, the cop will *not* register an offense for predicate methods
         
     | 
| 
      
 3092 
     | 
    
         
            +
              #   that may return a non-boolean value.
         
     | 
| 
      
 3093 
     | 
    
         
            +
              Mode: conservative
         
     | 
| 
      
 3094 
     | 
    
         
            +
              AllowedMethods:
         
     | 
| 
      
 3095 
     | 
    
         
            +
                - call
         
     | 
| 
      
 3096 
     | 
    
         
            +
              AllowedPatterns: []
         
     | 
| 
      
 3097 
     | 
    
         
            +
              AllowBangMethods: false
         
     | 
| 
      
 3098 
     | 
    
         
            +
              # Methods that are known to not return a boolean value, despite ending in `?`.
         
     | 
| 
      
 3099 
     | 
    
         
            +
              WaywardPredicates:
         
     | 
| 
      
 3100 
     | 
    
         
            +
                - nonzero?
         
     | 
| 
      
 3101 
     | 
    
         
            +
             
     | 
| 
      
 3102 
     | 
    
         
            +
            Naming/PredicatePrefix:
         
     | 
| 
      
 3103 
     | 
    
         
            +
              Description: 'Predicate method names should not be prefixed and end with a `?`.'
         
     | 
| 
       3051 
3104 
     | 
    
         
             
              StyleGuide: '#bool-methods-qmark'
         
     | 
| 
       3052 
3105 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       3053 
3106 
     | 
    
         
             
              VersionAdded: '0.50'
         
     | 
| 
         @@ -3154,6 +3207,7 @@ Security/JSONLoad: 
     | 
|
| 
       3154 
3207 
     | 
    
         
             
                             security issues. See reference for more information.
         
     | 
| 
       3155 
3208 
     | 
    
         
             
              References:
         
     | 
| 
       3156 
3209 
     | 
    
         
             
                - 'https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load'
         
     | 
| 
      
 3210 
     | 
    
         
            +
                - 'https://bugs.ruby-lang.org/issues/19528'
         
     | 
| 
       3157 
3211 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       3158 
3212 
     | 
    
         
             
              VersionAdded: '0.43'
         
     | 
| 
       3159 
3213 
     | 
    
         
             
              VersionChanged: '1.22'
         
     | 
| 
         @@ -3288,6 +3342,12 @@ Style/ArrayIntersect: 
     | 
|
| 
       3288 
3342 
     | 
    
         
             
              Safe: false
         
     | 
| 
       3289 
3343 
     | 
    
         
             
              VersionAdded: '1.40'
         
     | 
| 
       3290 
3344 
     | 
    
         | 
| 
      
 3345 
     | 
    
         
            +
            Style/ArrayIntersectWithSingleElement:
         
     | 
| 
      
 3346 
     | 
    
         
            +
              Description: 'Use `include?(element)` instead of `intersect?([element])`.'
         
     | 
| 
      
 3347 
     | 
    
         
            +
              Enabled: 'pending'
         
     | 
| 
      
 3348 
     | 
    
         
            +
              Safe: false
         
     | 
| 
      
 3349 
     | 
    
         
            +
              VersionAdded: '1.81'
         
     | 
| 
      
 3350 
     | 
    
         
            +
             
     | 
| 
       3291 
3351 
     | 
    
         
             
            Style/ArrayJoin:
         
     | 
| 
       3292 
3352 
     | 
    
         
             
              Description: 'Use Array#join instead of Array#*.'
         
     | 
| 
       3293 
3353 
     | 
    
         
             
              StyleGuide: '#array-join'
         
     | 
| 
         @@ -3632,6 +3692,13 @@ Style/CollectionMethods: 
     | 
|
| 
       3632 
3692 
     | 
    
         
             
                - inject
         
     | 
| 
       3633 
3693 
     | 
    
         
             
                - reduce
         
     | 
| 
       3634 
3694 
     | 
    
         | 
| 
      
 3695 
     | 
    
         
            +
            Style/CollectionQuerying:
         
     | 
| 
      
 3696 
     | 
    
         
            +
              Description: 'Prefer `Enumerable` predicate methods over expressions with `count`.'
         
     | 
| 
      
 3697 
     | 
    
         
            +
              StyleGuide: '#collection-querying'
         
     | 
| 
      
 3698 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 3699 
     | 
    
         
            +
              VersionAdded: '1.77'
         
     | 
| 
      
 3700 
     | 
    
         
            +
              Safe: false
         
     | 
| 
      
 3701 
     | 
    
         
            +
             
     | 
| 
       3635 
3702 
     | 
    
         
             
            Style/ColonMethodCall:
         
     | 
| 
       3636 
3703 
     | 
    
         
             
              Description: 'Do not use :: for method call.'
         
     | 
| 
       3637 
3704 
     | 
    
         
             
              StyleGuide: '#double-colons'
         
     | 
| 
         @@ -3939,6 +4006,16 @@ Style/EmptyMethod: 
     | 
|
| 
       3939 
4006 
     | 
    
         
             
                - compact
         
     | 
| 
       3940 
4007 
     | 
    
         
             
                - expanded
         
     | 
| 
       3941 
4008 
     | 
    
         | 
| 
      
 4009 
     | 
    
         
            +
            Style/EmptyStringInsideInterpolation:
         
     | 
| 
      
 4010 
     | 
    
         
            +
              Description: 'Checks for empty strings being assigned inside string interpolation.'
         
     | 
| 
      
 4011 
     | 
    
         
            +
              StyleGuide: '#empty-strings-in-interpolation'
         
     | 
| 
      
 4012 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 4013 
     | 
    
         
            +
              EnforcedStyle: trailing_conditional
         
     | 
| 
      
 4014 
     | 
    
         
            +
              SupportedStyles:
         
     | 
| 
      
 4015 
     | 
    
         
            +
                - trailing_conditional
         
     | 
| 
      
 4016 
     | 
    
         
            +
                - ternary
         
     | 
| 
      
 4017 
     | 
    
         
            +
              VersionAdded: '1.76'
         
     | 
| 
      
 4018 
     | 
    
         
            +
             
     | 
| 
       3942 
4019 
     | 
    
         
             
            Style/Encoding:
         
     | 
| 
       3943 
4020 
     | 
    
         
             
              Description: 'Use UTF-8 as the source file encoding.'
         
     | 
| 
       3944 
4021 
     | 
    
         
             
              StyleGuide: '#utf-8'
         
     | 
| 
         @@ -4023,6 +4100,9 @@ Style/FetchEnvVar: 
     | 
|
| 
       4023 
4100 
     | 
    
         
             
              VersionAdded: '1.28'
         
     | 
| 
       4024 
4101 
     | 
    
         
             
              # Environment variables to be excluded from the inspection.
         
     | 
| 
       4025 
4102 
     | 
    
         
             
              AllowedVars: []
         
     | 
| 
      
 4103 
     | 
    
         
            +
              # When `true`, autocorrects `ENV["key"]` to `ENV.fetch("key", nil)`.
         
     | 
| 
      
 4104 
     | 
    
         
            +
              # When `false`, autocorrects `ENV["key"]` to `ENV.fetch("key")`.
         
     | 
| 
      
 4105 
     | 
    
         
            +
              DefaultToNil: true
         
     | 
| 
       4026 
4106 
     | 
    
         | 
| 
       4027 
4107 
     | 
    
         
             
            Style/FileEmpty:
         
     | 
| 
       4028 
4108 
     | 
    
         
             
              Description: >-
         
     | 
| 
         @@ -4164,7 +4244,7 @@ Style/GlobalVars: 
     | 
|
| 
       4164 
4244 
     | 
    
         
             
              AllowedVariables: []
         
     | 
| 
       4165 
4245 
     | 
    
         | 
| 
       4166 
4246 
     | 
    
         
             
            Style/GuardClause:
         
     | 
| 
       4167 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 4247 
     | 
    
         
            +
              Description: 'Checks for conditionals that can be replaced with guard clauses.'
         
     | 
| 
       4168 
4248 
     | 
    
         
             
              StyleGuide: '#no-nested-conditionals'
         
     | 
| 
       4169 
4249 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       4170 
4250 
     | 
    
         
             
              VersionAdded: '0.20'
         
     | 
| 
         @@ -4426,19 +4506,21 @@ Style/IpAddresses: 
     | 
|
| 
       4426 
4506 
     | 
    
         
             
                - '**/*.gemspec'
         
     | 
| 
       4427 
4507 
     | 
    
         | 
| 
       4428 
4508 
     | 
    
         
             
            Style/ItAssignment:
         
     | 
| 
       4429 
     | 
    
         
            -
              Description: 'Checks for  
     | 
| 
      
 4509 
     | 
    
         
            +
              Description: 'Checks for local variables and method parameters named `it`.'
         
     | 
| 
       4430 
4510 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       4431 
4511 
     | 
    
         
             
              VersionAdded: '1.70'
         
     | 
| 
       4432 
4512 
     | 
    
         | 
| 
       4433 
4513 
     | 
    
         
             
            Style/ItBlockParameter:
         
     | 
| 
       4434 
4514 
     | 
    
         
             
              Description: 'Checks for blocks with one argument where `it` block parameter can be used.'
         
     | 
| 
       4435 
4515 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       4436 
     | 
    
         
            -
              EnforcedStyle:  
     | 
| 
      
 4516 
     | 
    
         
            +
              EnforcedStyle: allow_single_line
         
     | 
| 
       4437 
4517 
     | 
    
         
             
              SupportedStyles:
         
     | 
| 
      
 4518 
     | 
    
         
            +
                - allow_single_line
         
     | 
| 
       4438 
4519 
     | 
    
         
             
                - only_numbered_parameters
         
     | 
| 
       4439 
4520 
     | 
    
         
             
                - always
         
     | 
| 
       4440 
4521 
     | 
    
         
             
                - disallow
         
     | 
| 
       4441 
4522 
     | 
    
         
             
              VersionAdded: '1.75'
         
     | 
| 
      
 4523 
     | 
    
         
            +
              VersionChanged: '1.76'
         
     | 
| 
       4442 
4524 
     | 
    
         | 
| 
       4443 
4525 
     | 
    
         
             
            Style/KeywordArgumentsMerging:
         
     | 
| 
       4444 
4526 
     | 
    
         
             
              Description: >-
         
     | 
| 
         @@ -4471,8 +4553,9 @@ Style/LambdaCall: 
     | 
|
| 
       4471 
4553 
     | 
    
         
             
              Description: 'Use lambda.call(...) instead of lambda.(...).'
         
     | 
| 
       4472 
4554 
     | 
    
         
             
              StyleGuide: '#proc-call'
         
     | 
| 
       4473 
4555 
     | 
    
         
             
              Enabled: true
         
     | 
| 
      
 4556 
     | 
    
         
            +
              AutoCorrect: contextual
         
     | 
| 
       4474 
4557 
     | 
    
         
             
              VersionAdded: '0.13'
         
     | 
| 
       4475 
     | 
    
         
            -
              VersionChanged: ' 
     | 
| 
      
 4558 
     | 
    
         
            +
              VersionChanged: '1.81'
         
     | 
| 
       4476 
4559 
     | 
    
         
             
              EnforcedStyle: call
         
     | 
| 
       4477 
4560 
     | 
    
         
             
              SupportedStyles:
         
     | 
| 
       4478 
4561 
     | 
    
         
             
                - call
         
     | 
| 
         @@ -4969,7 +5052,7 @@ Style/OpenStructUse: 
     | 
|
| 
       4969 
5052 
     | 
    
         
             
                             Avoid using OpenStruct. As of Ruby 3.0, use is officially discouraged due to performance,
         
     | 
| 
       4970 
5053 
     | 
    
         
             
                             version compatibility, and potential security issues.
         
     | 
| 
       4971 
5054 
     | 
    
         
             
              References:
         
     | 
| 
       4972 
     | 
    
         
            -
                - https://docs.ruby-lang.org/en/3.0 
     | 
| 
      
 5055 
     | 
    
         
            +
                - https://docs.ruby-lang.org/en/3.0/OpenStruct.html#class-OpenStruct-label-Caveats
         
     | 
| 
       4973 
5056 
     | 
    
         | 
| 
       4974 
5057 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       4975 
5058 
     | 
    
         
             
              Safe: false
         
     | 
| 
         @@ -5125,7 +5208,7 @@ Style/RandomWithOffset: 
     | 
|
| 
       5125 
5208 
     | 
    
         
             
              VersionAdded: '0.52'
         
     | 
| 
       5126 
5209 
     | 
    
         | 
| 
       5127 
5210 
     | 
    
         
             
            Style/RedundantArgument:
         
     | 
| 
       5128 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 5211 
     | 
    
         
            +
              Description: 'Checks for a redundant argument passed to certain methods.'
         
     | 
| 
       5129 
5212 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       5130 
5213 
     | 
    
         
             
              Safe: false
         
     | 
| 
       5131 
5214 
     | 
    
         
             
              VersionAdded: '1.4'
         
     | 
| 
         @@ -5151,6 +5234,12 @@ Style/RedundantArrayConstructor: 
     | 
|
| 
       5151 
5234 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       5152 
5235 
     | 
    
         
             
              VersionAdded: '1.52'
         
     | 
| 
       5153 
5236 
     | 
    
         | 
| 
      
 5237 
     | 
    
         
            +
            Style/RedundantArrayFlatten:
         
     | 
| 
      
 5238 
     | 
    
         
            +
              Description: 'Checks for redundant calls of `Array#flatten`.'
         
     | 
| 
      
 5239 
     | 
    
         
            +
              Enabled: pending
         
     | 
| 
      
 5240 
     | 
    
         
            +
              Safe: false
         
     | 
| 
      
 5241 
     | 
    
         
            +
              VersionAdded: '1.76'
         
     | 
| 
      
 5242 
     | 
    
         
            +
             
     | 
| 
       5154 
5243 
     | 
    
         
             
            Style/RedundantAssignment:
         
     | 
| 
       5155 
5244 
     | 
    
         
             
              Description: 'Checks for redundant assignment before returning.'
         
     | 
| 
       5156 
5245 
     | 
    
         
             
              Enabled: true
         
     | 
| 
         @@ -5280,7 +5369,7 @@ Style/RedundantInterpolationUnfreeze: 
     | 
|
| 
       5280 
5369 
     | 
    
         
             
              VersionAdded: '1.66'
         
     | 
| 
       5281 
5370 
     | 
    
         | 
| 
       5282 
5371 
     | 
    
         
             
            Style/RedundantLineContinuation:
         
     | 
| 
       5283 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 5372 
     | 
    
         
            +
              Description: 'Checks for redundant line continuation.'
         
     | 
| 
       5284 
5373 
     | 
    
         
             
              Enabled: pending
         
     | 
| 
       5285 
5374 
     | 
    
         
             
              VersionAdded: '1.49'
         
     | 
| 
       5286 
5375 
     | 
    
         | 
| 
         @@ -5574,7 +5663,7 @@ Style/SpecialGlobalVars: 
     | 
|
| 
       5574 
5663 
     | 
    
         
             
                - use_builtin_english_names
         
     | 
| 
       5575 
5664 
     | 
    
         | 
| 
       5576 
5665 
     | 
    
         
             
            Style/StabbyLambdaParentheses:
         
     | 
| 
       5577 
     | 
    
         
            -
              Description: ' 
     | 
| 
      
 5666 
     | 
    
         
            +
              Description: 'Checks for the usage of parentheses around stabby lambda arguments.'
         
     | 
| 
       5578 
5667 
     | 
    
         
             
              StyleGuide: '#stabby-lambda-with-args'
         
     | 
| 
       5579 
5668 
     | 
    
         
             
              Enabled: true
         
     | 
| 
       5580 
5669 
     | 
    
         
             
              VersionAdded: '0.35'
         
     | 
| 
         @@ -5763,10 +5852,14 @@ Style/TrailingCommaInArguments: 
     | 
|
| 
       5763 
5852 
     | 
    
         
             
              # parenthesized method calls where each argument is on its own line.
         
     | 
| 
       5764 
5853 
     | 
    
         
             
              # If `consistent_comma`, the cop requires a comma after the last argument,
         
     | 
| 
       5765 
5854 
     | 
    
         
             
              # for all parenthesized method calls with arguments.
         
     | 
| 
      
 5855 
     | 
    
         
            +
              # If `diff_comma`, the cop requires a comma after the last argument, but only
         
     | 
| 
      
 5856 
     | 
    
         
            +
              # when that argument is followed by an immediate newline, even if
         
     | 
| 
      
 5857 
     | 
    
         
            +
              # there is an inline comment.
         
     | 
| 
       5766 
5858 
     | 
    
         
             
              EnforcedStyleForMultiline: no_comma
         
     | 
| 
       5767 
5859 
     | 
    
         
             
              SupportedStylesForMultiline:
         
     | 
| 
       5768 
5860 
     | 
    
         
             
                - comma
         
     | 
| 
       5769 
5861 
     | 
    
         
             
                - consistent_comma
         
     | 
| 
      
 5862 
     | 
    
         
            +
                - diff_comma
         
     | 
| 
       5770 
5863 
     | 
    
         
             
                - no_comma
         
     | 
| 
       5771 
5864 
     | 
    
         | 
| 
       5772 
5865 
     | 
    
         
             
            Style/TrailingCommaInArrayLiteral:
         
     | 
    
        data/config/obsoletion.yml
    CHANGED
    
    | 
         @@ -31,6 +31,9 @@ renamed: 
     | 
|
| 
       31 
31 
     | 
    
         
             
              Lint/UnneededRequireStatement: Lint/RedundantRequireStatement
         
     | 
| 
       32 
32 
     | 
    
         
             
              Lint/UnneededSplatExpansion: Lint/RedundantSplatExpansion
         
     | 
| 
       33 
33 
     | 
    
         
             
              Metrics/LineLength: Layout/LineLength
         
     | 
| 
      
 34 
     | 
    
         
            +
              Naming/PredicateName:
         
     | 
| 
      
 35 
     | 
    
         
            +
                new_name: Naming/PredicatePrefix
         
     | 
| 
      
 36 
     | 
    
         
            +
                severity: warning
         
     | 
| 
       34 
37 
     | 
    
         
             
              Naming/UncommunicativeBlockParamName: Naming/BlockParameterName
         
     | 
| 
       35 
38 
     | 
    
         
             
              Naming/UncommunicativeMethodParamName: Naming/MethodParameterName
         
     | 
| 
       36 
39 
     | 
    
         
             
              Style/AccessorMethodName: Naming/AccessorMethodName
         
     | 
| 
         @@ -44,7 +47,7 @@ renamed: 
     | 
|
| 
       44 
47 
     | 
    
         
             
              Style/MethodName: Naming/MethodName
         
     | 
| 
       45 
48 
     | 
    
         
             
              Style/OpMethod: Naming/BinaryOperatorParameterName
         
     | 
| 
       46 
49 
     | 
    
         
             
              Style/PredicateName:
         
     | 
| 
       47 
     | 
    
         
            -
                new_name: Naming/ 
     | 
| 
      
 50 
     | 
    
         
            +
                new_name: Naming/PredicatePrefix
         
     | 
| 
       48 
51 
     | 
    
         
             
                severity: warning
         
     | 
| 
       49 
52 
     | 
    
         
             
              Style/SingleSpaceBeforeFirstArg: Layout/SpaceBeforeFirstArg
         
     | 
| 
       50 
53 
     | 
    
         
             
              Style/UnneededCapitalW: Style/RedundantCapitalW
         
     | 
| 
         @@ -179,10 +182,10 @@ changed_parameters: 
     | 
|
| 
       179 
182 
     | 
    
         
             
              - cops: Naming/HeredocDelimiterNaming
         
     | 
| 
       180 
183 
     | 
    
         
             
                parameters: Blacklist
         
     | 
| 
       181 
184 
     | 
    
         
             
                alternative: ForbiddenDelimiters
         
     | 
| 
       182 
     | 
    
         
            -
              - cops: Naming/ 
     | 
| 
      
 185 
     | 
    
         
            +
              - cops: Naming/PredicatePrefix
         
     | 
| 
       183 
186 
     | 
    
         
             
                parameters: NamePrefixBlacklist
         
     | 
| 
       184 
187 
     | 
    
         
             
                alternative: ForbiddenPrefixes
         
     | 
| 
       185 
     | 
    
         
            -
              - cops: Naming/ 
     | 
| 
      
 188 
     | 
    
         
            +
              - cops: Naming/PredicatePrefix
         
     | 
| 
       186 
189 
     | 
    
         
             
                parameters: NameWhitelist
         
     | 
| 
       187 
190 
     | 
    
         
             
                alternative: AllowedMethods
         
     | 
| 
       188 
191 
     | 
    
         
             
              - cops:
         
     | 
    
        data/exe/rubocop
    CHANGED
    
    | 
         @@ -12,13 +12,6 @@ if RuboCop::Server.running? 
     | 
|
| 
       12 
12 
     | 
    
         
             
              exit_status = RuboCop::Server::ClientCommand::Exec.new.run
         
     | 
| 
       13 
13 
     | 
    
         
             
            else
         
     | 
| 
       14 
14 
     | 
    
         
             
              require 'rubocop'
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
              cli = RuboCop::CLI.new
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
              time_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
         
     | 
| 
       19 
     | 
    
         
            -
              exit_status = cli.run
         
     | 
| 
       20 
     | 
    
         
            -
              elapsed_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) - time_start
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
              puts "Finished in #{elapsed_time} seconds" if cli.options[:debug] || cli.options[:display_time]
         
     | 
| 
      
 15 
     | 
    
         
            +
              exit_status = RuboCop::CLI.new.run
         
     | 
| 
       23 
16 
     | 
    
         
             
            end
         
     | 
| 
       24 
17 
     | 
    
         
             
            exit exit_status
         
     | 
| 
         @@ -83,7 +83,7 @@ module RuboCop 
     | 
|
| 
       83 
83 
     | 
    
         
             
                      execute_runner
         
     | 
| 
       84 
84 
     | 
    
         
             
                      @options.delete(:only)
         
     | 
| 
       85 
85 
     | 
    
         
             
                      @config_store = ConfigStore.new
         
     | 
| 
       86 
     | 
    
         
            -
                      @config_store. 
     | 
| 
      
 86 
     | 
    
         
            +
                      @config_store.apply_options!(@options)
         
     | 
| 
       87 
87 
     | 
    
         
             
                      # Save the todo configuration of the LineLength cop.
         
     | 
| 
       88 
88 
     | 
    
         
             
                      File.read(AUTO_GENERATED_FILE).lines.drop_while { |line| line.start_with?('#') }.join
         
     | 
| 
       89 
89 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -99,7 +99,7 @@ module RuboCop 
     | 
|
| 
       99 
99 
     | 
    
         | 
| 
       100 
100 
     | 
    
         
             
                    def reset_config_and_auto_gen_file
         
     | 
| 
       101 
101 
     | 
    
         
             
                      @config_store = ConfigStore.new
         
     | 
| 
       102 
     | 
    
         
            -
                      @config_store. 
     | 
| 
      
 102 
     | 
    
         
            +
                      @config_store.apply_options!(@options)
         
     | 
| 
       103 
103 
     | 
    
         
             
                      File.open(AUTO_GENERATED_FILE, 'w') {} # create or truncate if exists
         
     | 
| 
       104 
104 
     | 
    
         
             
                      add_inheritance_from_auto_generated_file(@options[:config])
         
     | 
| 
       105 
105 
     | 
    
         
             
                    end
         
     | 
    
        data/lib/rubocop/cli.rb
    CHANGED
    
    | 
         @@ -12,7 +12,7 @@ module RuboCop 
     | 
|
| 
       12 
12 
     | 
    
         
             
                STATUS_INTERRUPTED = Signal.list['INT'] + 128
         
     | 
| 
       13 
13 
     | 
    
         
             
                DEFAULT_PARALLEL_OPTIONS = %i[
         
     | 
| 
       14 
14 
     | 
    
         
             
                  color config debug display_style_guide display_time display_only_fail_level_offenses
         
     | 
| 
       15 
     | 
    
         
            -
                  display_only_failed editor_mode except extra_details fail_level fix_layout format
         
     | 
| 
      
 15 
     | 
    
         
            +
                  display_only_failed editor_mode except extra_details fail_level fix_layout format formatters
         
     | 
| 
       16 
16 
     | 
    
         
             
                  ignore_disable_comments lint only only_guide_cops require safe
         
     | 
| 
       17 
17 
     | 
    
         
             
                  autocorrect safe_autocorrect autocorrect_all
         
     | 
| 
       18 
18 
     | 
    
         
             
                ].freeze
         
     | 
| 
         @@ -37,6 +37,8 @@ module RuboCop 
     | 
|
| 
       37 
37 
     | 
    
         
             
                #
         
     | 
| 
       38 
38 
     | 
    
         
             
                # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
         
     | 
| 
       39 
39 
     | 
    
         
             
                def run(args = ARGV)
         
     | 
| 
      
 40 
     | 
    
         
            +
                  time_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
       40 
42 
     | 
    
         
             
                  @options, paths = Options.new.parse(args)
         
     | 
| 
       41 
43 
     | 
    
         
             
                  @env = Environment.new(@options, @config_store, paths)
         
     | 
| 
       42 
44 
     | 
    
         | 
| 
         @@ -48,6 +50,7 @@ module RuboCop 
     | 
|
| 
       48 
50 
     | 
    
         
             
                      validate_options_vs_config
         
     | 
| 
       49 
51 
     | 
    
         
             
                      parallel_by_default!
         
     | 
| 
       50 
52 
     | 
    
         
             
                      apply_default_formatter
         
     | 
| 
      
 53 
     | 
    
         
            +
                      report_pending_cops
         
     | 
| 
       51 
54 
     | 
    
         
             
                      execute_runners
         
     | 
| 
       52 
55 
     | 
    
         
             
                    end
         
     | 
| 
       53 
56 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -71,6 +74,9 @@ module RuboCop 
     | 
|
| 
       71 
74 
     | 
    
         
             
                  warn e.message
         
     | 
| 
       72 
75 
     | 
    
         
             
                  warn e.backtrace
         
     | 
| 
       73 
76 
     | 
    
         
             
                  STATUS_ERROR
         
     | 
| 
      
 77 
     | 
    
         
            +
                ensure
         
     | 
| 
      
 78 
     | 
    
         
            +
                  elapsed_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) - time_start
         
     | 
| 
      
 79 
     | 
    
         
            +
                  puts "Finished in #{elapsed_time} seconds" if @options[:debug] || @options[:display_time]
         
     | 
| 
       74 
80 
     | 
    
         
             
                end
         
     | 
| 
       75 
81 
     | 
    
         
             
                # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
         
     | 
| 
       76 
82 
     | 
    
         | 
| 
         @@ -155,10 +161,10 @@ module RuboCop 
     | 
|
| 
       155 
161 
     | 
    
         | 
| 
       156 
162 
     | 
    
         
             
                def act_on_options
         
     | 
| 
       157 
163 
     | 
    
         
             
                  set_options_to_config_loader
         
     | 
| 
      
 164 
     | 
    
         
            +
                  set_options_to_pending_cops_reporter
         
     | 
| 
       158 
165 
     | 
    
         
             
                  handle_editor_mode
         
     | 
| 
       159 
166 
     | 
    
         | 
| 
       160 
     | 
    
         
            -
                  @config_store. 
     | 
| 
       161 
     | 
    
         
            -
                  @config_store.force_default_config! if @options[:force_default_config]
         
     | 
| 
      
 167 
     | 
    
         
            +
                  @config_store.apply_options!(@options)
         
     | 
| 
       162 
168 
     | 
    
         | 
| 
       163 
169 
     | 
    
         
             
                  handle_exiting_options
         
     | 
| 
       164 
170 
     | 
    
         | 
| 
         @@ -179,6 +185,11 @@ module RuboCop 
     | 
|
| 
       179 
185 
     | 
    
         
             
                  ConfigLoader.ignore_unrecognized_cops = @options[:ignore_unrecognized_cops]
         
     | 
| 
       180 
186 
     | 
    
         
             
                end
         
     | 
| 
       181 
187 
     | 
    
         | 
| 
      
 188 
     | 
    
         
            +
                def set_options_to_pending_cops_reporter
         
     | 
| 
      
 189 
     | 
    
         
            +
                  PendingCopsReporter.disable_pending_cops = @options[:disable_pending_cops]
         
     | 
| 
      
 190 
     | 
    
         
            +
                  PendingCopsReporter.enable_pending_cops = @options[:enable_pending_cops]
         
     | 
| 
      
 191 
     | 
    
         
            +
                end
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
       182 
193 
     | 
    
         
             
                def handle_editor_mode
         
     | 
| 
       183 
194 
     | 
    
         
             
                  RuboCop::LSP.enable if @options[:editor_mode]
         
     | 
| 
       184 
195 
     | 
    
         
             
                end
         
     | 
| 
         @@ -208,5 +219,9 @@ module RuboCop 
     | 
|
| 
       208 
219 
     | 
    
         
             
                    [[formatter, @options[:output_path]]]
         
     | 
| 
       209 
220 
     | 
    
         
             
                  end
         
     | 
| 
       210 
221 
     | 
    
         
             
                end
         
     | 
| 
      
 222 
     | 
    
         
            +
             
     | 
| 
      
 223 
     | 
    
         
            +
                def report_pending_cops
         
     | 
| 
      
 224 
     | 
    
         
            +
                  PendingCopsReporter.warn_if_needed(@config_store.for_pwd)
         
     | 
| 
      
 225 
     | 
    
         
            +
                end
         
     | 
| 
       211 
226 
     | 
    
         
             
              end
         
     | 
| 
       212 
227 
     | 
    
         
             
            end
         
     |