-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
89 lines (79 loc) · 1.74 KB
/
.rubocop.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
require:
- rubocop-performance
- rubocop-rspec
AllCops:
Exclude:
- '.git/**/*'
- 'bin/**/*'
- 'coverage/**/*'
- 'db/**/*'
- 'log/**/*'
- 'tmp/**/*'
- 'public/**/*'
- 'spec/fixtures/**/*'
- 'config/puma.rb'
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 3.0.1
NewCops: enable
Metrics/AbcSize:
# default 15 is too strict but we can lower in the future
Max: 15
Metrics/ClassLength:
# default 100 is too strict but we can lower in the future
Max: 100
# 10 lines by default is too restrictive
Metrics/MethodLength:
Max: 10
# Disagree with these for now
Metrics/BlockLength:
IgnoredMethods: ['describe', 'context', 'class_methods', 'included']
Style/NumericLiterals:
Enabled: false
Style/Documentation:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
# Seem broken?
Style/Alias:
Enabled: false
Style/DoubleNegation:
Enabled: false
# Temp disable the below
Style/RegexpLiteral:
Enabled: false
Style/BlockDelimiters:
Enabled: false
Layout/LineLength:
Max: 130
Lint/RescueException:
Enabled: false
Style/MissingRespondToMissing:
Enabled: false
Lint/UselessMethodDefinition:
Enabled: true
Naming/VariableNumber:
Enabled: false
# Specs are namespaced with modules so no need to prefix it
# eg. With `RSpec/FilePath` enabled, rubocop will raise error
# => Spec path should end with queries/user*_spec.rb
# for `users/show_spec` which IMO is not necessary.
#
RSpec/FilePath:
Enabled: false
# Let's be a bit lenient to begin with. :)
RSpec/NestedGroups:
Max: 6
RSpec/MultipleExpectations:
Max: 10
RSpec/ExampleLength:
Max: 15
RSpec/ContextWording:
Prefixes:
- for
- when
- with
- without
RSpec/DescribeClass:
Exclude:
- spec/tasks/*