Skip to content

Commit

Permalink
Handle files passed to rubocop in require mode
Browse files Browse the repository at this point in the history
  • Loading branch information
skryukov committed Dec 7, 2023
1 parent efbe81c commit 79372de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning].

## [Unreleased]

### Fixed

- Respect files passed to rubocop in required mode. ([@skryukov])

## [0.3.4] - 2023-10-26

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions lib/rubocop/gradual/patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def load_command(command)
end

def parse_options
options, rubocop_options = Options.new.parse(ARGV)
options, *tail_options = Options.new.parse(ARGV)
options[:mode] = :force_update if @env.paths[0..1] == %w[gradual force_update]
options[:mode] = :check if @env.paths[0..1] == %w[gradual check]
[options, rubocop_options]
tail_options.unshift(options)
end
end
end
Expand Down

0 comments on commit 79372de

Please sign in to comment.