forked from mbj/mutant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
192 lines (163 loc) · 3.94 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
AllCops:
DisplayCopNames: true
Exclude:
- 'test_app/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
NewCops: enable
TargetRubyVersion: 2.7
# This is output on every run of `rubocop` and feels fairly noisy.
SuggestExtensions: false
# Avoid parameter lists longer than three parameters.
Metrics/ParameterLists:
Max: 3
CountKeywordArgs: true
# Avoid more than `Max` levels of nesting.
Metrics/BlockNesting:
Max: 3
# Align with the style guide.
Style/CollectionMethods:
Enabled: true
PreferredMethods:
find: 'detect'
Layout/AccessModifierIndentation:
Enabled: false
# Limit line length
Layout/LineLength:
Max: 120
# Disable documentation checking until a class needs to be documented once
Style/Documentation:
Enabled: false
# Permit
#
# boolean_check? or fail
#
# Reject
#
# if foo or bar
# ...
# end
Style/AndOr:
EnforcedStyle: conditionals
# Do not favor modifier if/unless usage when you have a single-line body
Style/IfUnlessModifier:
Enabled: false
# Allow case equality operator (in limited use within the specs)
Style/CaseEquality:
Enabled: false
# Constants do not always have to use SCREAMING_SNAKE_CASE
Naming/ConstantName:
Enabled: false
# Not all trivial readers/writers can be defined with attr_* methods
Style/TrivialAccessors:
Enabled: false
# Allow empty lines around class body
Layout/EmptyLinesAroundClassBody:
Enabled: false
# Allow empty lines around module body
Layout/EmptyLinesAroundModuleBody:
Enabled: false
# Allow empty lines around block body
Layout/EmptyLinesAroundBlockBody:
Enabled: false
# Allow multiple line operations to not require indentation
Layout/MultilineOperationIndentation:
Enabled: false
# Prefer String#% over Kernel#sprintf
Style/FormatString:
EnforcedStyle: percent
# Prefer #kind_of? over #is_a?
Style/ClassCheck:
EnforcedStyle: kind_of?
# Do not prefer double quotes to be used when %q or %Q is more appropriate
Style/RedundantPercentQ:
Enabled: false
# Allow a maximum ABC score
Metrics/AbcSize:
Max: 21.02
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
- 'mutant.gemspec'
# Buggy cop, returns false positive for our code base
Lint/NonLocalExitFromIterator:
Enabled: false
# We use parallel assignments with great success
Style/ParallelAssignment:
Enabled: false
# Buggy
Lint/FormatParameterMismatch:
Enabled: false
# Different preference
Style/SignalException:
EnforcedStyle: semantic
# Do not use `alias`
Style/Alias:
EnforcedStyle: prefer_alias_method
# Do not waste my horizontal or vertical space
Layout/FirstArrayElementIndentation:
Enabled: false
# Prefer
#
# some_receiver
# .foo
# .bar
# .baz
#
# Over
#
# some_receiver.foo
# .bar
# .baz
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
# Prefer `public_send` and `__send__` over `send`
Style/Send:
Enabled: true
Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Lint/BooleanSymbol:
Enabled: false
Lint/InterpolationCheck:
Enabled: false
Lint/MissingCopEnableDirective:
Enabled: false
Lint/UnifiedInteger:
Enabled: false
Naming/FileName:
Enabled: false
Style/AccessModifierDeclarations:
Enabled: false
Style/CommentedKeyword:
Enabled: false
Style/MixinGrouping:
Enabled: false
Style/RaiseArgs:
Enabled: false
Style/RescueStandardError:
Enabled: false
Style/StderrPuts:
Enabled: false
# Fine inside stabby lambdas
Style/Semicolon:
Enabled: false
# suggesting single letter variablesl bah
Naming/RescuedExceptionsVariableName:
Enabled: false
# false positive on private keywords
Layout/IndentationWidth:
Enabled: false
# I do them alphabetically
Style/KeywordParametersOrder:
Enabled: false
# Empty blocks are useful
Lint/EmptyBlock:
Enabled: false
# Bad advice, as the '' are the least powerful syntax
Style/RedundantHeredocDelimiterQuotes:
Enabled: false