-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
.rubocop.yml
103 lines (78 loc) · 1.82 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
require:
- rubocop-performance
- rubocop-rails
- rubocop-rspec
- rubocop-factory_bot
- rubocop-capybara
AllCops:
Exclude:
- 'bin/**/*'
- 'db/schema.rb'
- 'db/data_schema.rb'
- 'vendor/**/*'
- 'vendor/bundle/**/*'
- 'config/routes.rb'
DisabledByDefault: false
TargetRubyVersion: 3.1
NewCops: enable
# Document classes and non-namespace modules.
Style/Documentation:
Enabled: false
RSpec/ContextWording:
Enabled: false
# Enable having multiple expectations per example in a spec.
RSpec/MultipleExpectations:
Enabled: false
# Enable having long examples
RSpec/ExampleLength:
Enabled: false
# Enable having arbitrary Spec path i.e. Api::V1::Controller.
RSpec/FilePath:
Enabled: false
RSpec/LetSetup:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/NestedGroups:
Max: 7
RSpec/StubbedMock:
Enabled: false
# Enable having lines with up to 150 charachters in length.
Layout/LineLength:
Max: 150
# Avoid methods longer than 10 lines of code.
Metrics/MethodLength:
Enabled: false
# Avoid long blocks with many lines.
Metrics/BlockLength:
AllowedMethods: [ 'describe', 'context', 'xdescribe', 'xcontext', 'FactoryBot.define' ]
Exclude:
- 'config/routes.rb'
- 'config/environments/production.rb'
Max: 70
Metrics/ClassLength:
Max: 150
# A calculated magnitude based on number of assignments,
# branches, and conditions.
Metrics/AbcSize:
Max: 90
Metrics/ParameterLists:
CountKeywordArgs: false
RSpec/AnyInstance:
Enabled: false
Metrics/CyclomaticComplexity:
Max: 20
Metrics/PerceivedComplexity:
Max: 20
Rails/Exit:
Exclude:
- 'lib/tasks/task_helpers.rb'
Rails/Output:
Exclude:
- 'lib/tasks/task_helpers.rb'
Rails/RootPathnameMethods:
Enabled: false
Rails/ThreeStateBooleanColumn:
Enabled: false