forked from bigcommerce/gruf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
109 lines (82 loc) · 1.98 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
103
104
105
106
107
108
109
AllCops:
TargetRubyVersion: 2.6
NewCops: enable
Exclude:
- .bundle/**/*
- bin/**/*
- vendor/**/*
- tmp/**/*
- log/**/*
- spec/support/**/*
- spec/factories/**/*
- spec/fixtures/**/*
- spec/pb/**/*
- spec/demo_server
require:
- rubocop-performance
- rubocop-rspec
- rubocop-thread_safety
Layout/EndAlignment:
Enabled: false
Metrics/AbcSize:
Max: 147
Metrics/ClassLength:
Max: 406
Metrics/CyclomaticComplexity:
Max: 12
Layout/LineLength:
Max: 120
Metrics/MethodLength:
Max: 88
Metrics/ModuleLength:
Max: 1000
Metrics/ParameterLists:
Max: 9
MaxOptionalParameters: 5
Metrics/PerceivedComplexity:
Max: 12
Naming/PredicateName:
Enabled: false
Metrics/BlockLength:
Enabled: false
# Rubocop is opinionated here, which makes compositional base classes/interfaces with keyword arguments problematic.
# Disabling this allows base class stub methods to have keyword args.
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true
# This cop also affects hash keys, which is bad as we can't always control that. Disabling.
Naming/VariableNumber:
Enabled: false
# We're fine with this
ThreadSafety/NewThread:
Enabled: false
# Not necessary
Layout/EmptyLineBetweenDefs:
Enabled: false
####################################################################################################
# RSpec Configurations
####################################################################################################
RSpec/MessageSpies:
EnforcedStyle: receive
RSpec/MultipleExpectations:
Max: 30
RSpec/NamedSubject:
Enabled: false
RSpec/NestedGroups:
Enabled: false
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/ExampleLength:
Max: 50
RSpec/AnyInstance:
Enabled: false
RSpec/StubbedMock:
Enabled: false
# This does not work with RPC messages
RSpec/VerifiedDoubles:
Enabled: false
RSpec/DescribeClass:
Exclude:
- spec/gruf/functional/**/*
RSpec/IteratedExpectation:
Exclude:
- spec/gruf/functional/**/*