Skip to content

Commit 5f625ad

Browse files
committed
lint fixes and rubocop setting
1 parent 16c8c84 commit 5f625ad

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.rubocop.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,25 @@ MethodLength:
3434
Style/SafeNavigation:
3535
Enabled: false
3636

37+
# disable this cop, dont agree with it
38+
Style/FetchEnvVar:
39+
Enabled: false
40+
3741
# buggus check in Rubocop.
3842
# SerpApiClient constructor is rated to 9
3943
# def initialize(params = {})
4044
Metrics/CyclomaticComplexity:
4145
Max: 12
4246

4347
AllCops:
48+
# hide message
49+
SuggestExtensions: false
50+
# show new cops
4451
NewCops: enable
52+
# exclude rspec files from linting
4553
Exclude:
4654
- 'serpapi.gemspec'
4755
- 'spec/**/*_spec.rb'
4856
- 'spec/spec_helper.rb'
49-
- 'script/*'
50-
- 'oobt/*'
5157
- 'Gemfile'
5258
- 'Rakefile'

demo/demo.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
q: 'coffee'
1919
}
2020
results = client.search(params)
21-
if !results[:organic_results]
21+
unless results[:organic_results]
2222
puts 'organic results found'
2323
exit 1
2424
end

0 commit comments

Comments
 (0)