Skip to content

Commit

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

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

- rubocop#6845 (comment)
- rubocop#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 runinng `rubocop`
command.

It just leave a warning just to `gem install rubocop`.
https://github.com/rubocop-hq/rubocop/blob/v0.67.2/rubocop.gemspec#L47
  • Loading branch information
koic committed Apr 17, 2019
1 parent 2814669 commit d78e20d
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 d78e20d

Please sign in to comment.