Skip to content

Commit

Permalink
[Fix #6939] Remove warn for rubocop-performance (#6944)
Browse files Browse the repository at this point in the history
Fixes #6939.
Fixes #6917.

This warning should not be displayed if users don't use Performance cops
as follows:

- #6845 (comment)
- #6919 (comment)

In the future, it will be better to replace it with a mechanism that
displays a warning only when the user need Performance cops.

This PR removes a warning for rubocop-performance when running `rubocop`
command.

It leaves a warning just for `gem install rubocop`.
https://github.com/rubocop-hq/rubocop/blob/v0.67.2/rubocop.gemspec#L47
  • Loading branch information
koic authored and bbatsov committed Apr 17, 2019
1 parent 0aebdab commit b6b9ae1
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions exe/rubocop
Expand Up @@ -9,18 +9,6 @@ require 'benchmark'
cli = RuboCop::CLI.new
result = 0

if defined?(Bundler)
gemfile_lock = Bundler.read_file(Bundler.default_lockfile)
parser = Bundler::LockfileParser.new(gemfile_lock)

unless parser.dependencies['rubocop-performance']
warn Rainbow(<<-MESSAGE.strip_indent).yellow.to_s
[Warn] Performance Cops will be removed from RuboCop 0.68. Use rubocop-performance gem instead.
https://github.com/rubocop-hq/rubocop/tree/master/manual/migrate_performance_cops.md
MESSAGE
end
end

time = Benchmark.realtime do
result = cli.run
end
Expand Down

0 comments on commit b6b9ae1

Please sign in to comment.