KEMBAR78
Comparing v1.54.0...v1.54.1 · rubocop/rubocop · GitHub
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubocop/rubocop
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.54.0
Choose a base ref
...
head repository: rubocop/rubocop
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.54.1
Choose a head ref
  • 10 commits
  • 18 files changed
  • 3 contributors

Commits on Jul 1, 2023

  1. Switch back the docs version

    bbatsov committed Jul 1, 2023
    Configuration menu
    Copy the full SHA
    ff0effd View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2023

  1. Fix false negatives for Style/RedundantRegexpArgument

    This PR fixes false negatives for `Style/RedundantRegexpArgument`
    when using safe navigation operator.
    koic authored and bbatsov committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    5998474 View commit details
    Browse the repository at this point in the history
  2. Fix an error for Metrics/MethodLength

    This PR fixes the following error for `Metrics/MethodLength`
    when using a heredoc in a block without block arguments:
    
    ```console
    $ cd path/to/rubocop-ast
    $ bundle exec rubocop -d --only Metrics/MethodLength lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb
    (snip)
    
    Scanning /Users/koic/src/github.com/rubocop/rubocop-ast/lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb
    An error occurred while Metrics/MethodLength cop was inspecting /Users/koic/src/github.com/rubocop/rubocop-ast/lib/
    rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb:88:10.
    undefined method `last_line' for nil
    /Users/koic/.rbenv/versions/3.3.0-dev/lib/ruby/gems/3.3.0+0/gems/parser-3.2.2.3/lib/parser/source/map.rb:118:
    in `last_line'
    /Users/koic/src/github.com/rubocop/rubocop-ast/lib/rubocop/ast/node.rb:266:in `last_line'
    /Users/koic/src/github.com/rubocop/rubocop/lib/rubocop/cop/metrics/utils/code_length_calculator.rb:199:
    in `block in source_from_node_with_heredoc'
    ```
    koic authored and bbatsov committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    fa8c74e View commit details
    Browse the repository at this point in the history
  3. Fix an error for InternalAffairs/LocationLineEqualityComparison whe…

    …n inside block
    
    This PR if fix an error for `InternalAffairs/LocationLineEqualityComparison` when inside block.
    
    Code to reproduce:
    ```ruby
    nodes.select do |node|
      node.first_line == nodes.first.first_line
    end
    ```
    
    Log:
    ```
    An error occurred while InternalAffairs/LocationLineEqualityComparison cop was inspecting /ydah/rubocop-rspec/a.rb:2:2.
    undefined method `method?' for s(:lvar, :node):RuboCop::AST::Node
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb:54:in `extract_receiver'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/internal_affairs/location_line_equality_comparison.rb:41:in `on_send'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:107:in `public_send'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:107:in `block (2 levels) in trigger_responding_cops'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:171:in `with_cop_error_handling'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:106:in `block in trigger_responding_cops'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:105:in `each'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:105:in `trigger_responding_cops'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:69:in `on_send'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.29.0/lib/rubocop/ast/traversal.rb:158:in `on_block'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:71:in `on_block'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.29.0/lib/rubocop/ast/traversal.rb:20:in `walk'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/commissioner.rb:87:in `investigate'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/team.rb:156:in `investigate_partial'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cop/team.rb:98:in `investigate'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:345:in `block in inspect_file'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:344:in `each'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:344:in `flat_map'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:344:in `inspect_file'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:287:in `block in do_inspection_loop'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:321:in `block in iterate_until_no_changes'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:314:in `loop'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:314:in `iterate_until_no_changes'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:283:in `do_inspection_loop'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:164:in `block in file_offenses'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:189:in `file_offense_cache'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:163:in `file_offenses'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:154:in `process_file'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:135:in `block in each_inspected_file'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:134:in `each'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:134:in `reduce'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:134:in `each_inspected_file'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:120:in `inspect_files'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/runner.rb:73:in `run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli/command/execute_runner.rb:26:in `block in execute_runner'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli/command/execute_runner.rb:52:in `with_redirect'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli/command.rb:11:in `run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli/environment.rb:18:in `run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli.rb:118:in `run_command'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli.rb:125:in `execute_runners'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli.rb:51:in `block in run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli.rb:77:in `profile_if_needed'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/lib/rubocop/cli.rb:43:in `run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/exe/rubocop:19:in `block in <top (required)>'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/benchmark.rb:311:in `realtime'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rubocop-1.54.0/exe/rubocop:19:in `<top (required)>'
    /ydah/.rbenv/versions/3.2.2/bin/rubocop:25:in `load'
    /ydah/.rbenv/versions/3.2.2/bin/rubocop:25:in `<top (required)>'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `load'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `kernel_load'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli/exec.rb:23:in `run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli.rb:492:in `exec'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli.rb:34:in `dispatch'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/cli.rb:28:in `start'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.10/libexec/bundle:45:in `block in <top (required)>'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/3.2.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
    /ydah/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.10/libexec/bundle:33:in `<top (required)>'
    /ydah/.rbenv/versions/3.2.2/bin/bundle:25:in `load'
    /ydah/.rbenv/versions/3.2.2/bin/bundle:25:in `<main>'
    ```
    
    RuboCop version:
    ```
    rubocop -V
    1.54.0 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [x86_64-darwin21]
      - rubocop-performance 1.18.0
      - rubocop-rake 0.6.0
      - rubocop-rspec 2.22.0
    ```
    ydah committed Jul 2, 2023
    Configuration menu
    Copy the full SHA
    0583bce View commit details
    Browse the repository at this point in the history
  4. Merge pull request #12012 from ydah/fix-internal-affairs-location-lin…

    …e-equality-comparison
    
    Fix an error for `InternalAffairs/LocationLineEqualityComparison` when inside block
    koic authored Jul 2, 2023
    Configuration menu
    Copy the full SHA
    fb54dac View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. [Fix #12014] Fix an error for Lint/UselessAssignment

    Fixes #12014.
    
    This PR fixes an error for `Lint/UselessAssignment`
    when part of a multiple assignment is enclosed in parentheses.
    koic authored and bbatsov committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    0932941 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. [Fix #12024] Fix a false positive for Lint/RedundantRegexpQuantifiers

    Fixes #12024.
    
    This PR fixes a false positive for `Lint/RedundantRegexpQuantifiers`
    when interpolation is used in a regexp literal.
    koic authored and bbatsov committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    c969b34 View commit details
    Browse the repository at this point in the history
  2. [Fix #12020] Fix an error for Layout/SpaceAfterComma with `Layout/S…

    …paceBeforeSemicolon`
    
    Fixes #12020.
    
    This PR fixes an infinite loop error for `Layout/SpaceAfterComma`
    with `Layout/SpaceBeforeSemicolon` when autocorrection conflicts.
    
    The use of semicolon after comma (`,;`) is limited, so making it difficult to default
    the presence or absence of space between the semicolon and the comma.
    This PR aims to prevent an infinite loop error occurrences by always allowing the absence of
    space after comma when it is followed by semicolon.
    koic authored and bbatsov committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    3ec4959 View commit details
    Browse the repository at this point in the history
  3. Update Changelog

    bbatsov committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    32e0884 View commit details
    Browse the repository at this point in the history
  4. Cut 1.54.1

    bbatsov committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    dbee3c2 View commit details
    Browse the repository at this point in the history
Loading