Skip to content

Commit f38de9c

Browse files
committed
rake call rubocop directly
1 parent af98ea3 commit f38de9c

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

.rubocop.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Metrics/AbcSize:
1212

1313
# short clear method name
1414
Metrics/MethodLength:
15-
Max: 25
15+
Max: 30
1616

1717
# no performance implication
1818
Style/OptionalBooleanParameter:
@@ -30,10 +30,6 @@ Style/FrozenStringLiteralComment:
3030
Metrics/PerceivedComplexity:
3131
Max: 12
3232

33-
# method length is not a problem
34-
MethodLength:
35-
Max: 30
36-
3733
# if works as well as safe navigation (&.)
3834
Style/SafeNavigation:
3935
Enabled: false

Rakefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
require 'rake'
1212
require 'rspec/core/rake_task'
13-
require 'rubocop/rake_task'
1413
require 'yard'
1514
require_relative 'lib/serpapi'
1615

@@ -49,9 +48,9 @@ RSpec::Core::RakeTask.new(:benchmark) do |t|
4948
t.rspec_opts = '--format documentation'
5049
end
5150

52-
RuboCop::RakeTask.new(:lint) do |t|
53-
t.plugins << 'rubocop-rake'
54-
t.options = ['--display-cop-names']
51+
desc 'run rubocop linter'
52+
task :lint do
53+
sh('rubocop --display-cop-names')
5554
end
5655

5756
desc "format ruby code using rubocop"

0 commit comments

Comments
 (0)