-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.rubocop.yml
More file actions
62 lines (50 loc) · 1.2 KB
/
.rubocop.yml
File metadata and controls
62 lines (50 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# human should be able to read 200 chars per line
Layout/LineLength:
Max: 200
# relax branch condition size, code can be too verbose
Metrics/AbcSize:
Max: 40
# short clear method name
Metrics/MethodLength:
Max: 25
# no performance implication
Style/OptionalBooleanParameter:
Enabled: false
# %i(array) is not common in Ruby
Style/SymbolArray:
Enabled: false
# too restrictive
Style/FrozenStringLiteralComment:
Enabled: false
# default complexity is low at 8
Metrics/PerceivedComplexity:
Max: 12
# method length is not a problem
MethodLength:
Max: 30
# if works as well as safe navigation (&.)
Style/SafeNavigation:
Enabled: false
# disable this cop, dont agree with it
Style/FetchEnvVar:
Enabled: false
# buggus check in Rubocop.
# SerpApiClient constructor is rated to 9
# def initialize(params = {})
Metrics/CyclomaticComplexity:
Max: 12
# this rule doesn't always work well with Ruby
Layout/FirstHashElementIndentation:
Enabled: false
AllCops:
# hide message
SuggestExtensions: false
# show new cops
NewCops: enable
# exclude rspec files from linting
Exclude:
- 'serpapi.gemspec'
- 'spec/**/*_spec.rb'
- 'spec/spec_helper.rb'
- 'Gemfile'
- 'Rakefile'