-
Notifications
You must be signed in to change notification settings - Fork 63
/
.rubocop.yml
239 lines (177 loc) · 3.99 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# The behavior of RuboCop can be controlled via the .rubocop.yml
# configuration file. It makes it possible to enable/disable
# certain cops (checks) and to alter their behavior if they accept
# any parameters. The file can be placed either in your home
# directory or in some project directory.
#
# RuboCop will start looking for the configuration file in the directory
# where the inspected file is and continue its way up to the root directory.
#
# See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
require:
- rubocop-rake
- rubocop-rspec
AllCops:
Exclude:
- 'bin/*'
NewCops: enable
TargetRubyVersion: 2.4
Bundler/GemComment:
Enabled: true
Bundler/OrderedGems:
TreatCommentsAsGroupSeparators: true
RSpec/Capybara/FeatureMethods:
Enabled: true
EnabledMethods:
- feature
- given
- background
- scenario
Layout/ArgumentAlignment:
Enabled: true
Layout/BlockAlignment:
Enabled: true
Layout/BlockEndNewline:
Enabled: true
Layout/ClassStructure:
Enabled: true
Categories:
module_inclusion:
- include
- prepend
- extend
ExpectedOrder:
- module_inclusion
- constants
- public_class_methods
- initializer
- instance_methods
- protected_methods
- private_methods
Layout/ClosingParenthesisIndentation:
Enabled: true
Layout/EndOfLine:
EnforcedStyle: lf
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/FirstArgumentIndentation:
Enabled: true
Layout/FirstArrayElementIndentation:
Enabled: true
EnforcedStyle: consistent
IndentationWidth: 2
Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: consistent
Layout/FirstParameterIndentation:
Enabled: true
EnforcedStyle: consistent
Layout/HashAlignment:
Enabled: true
Layout/IndentationWidth:
Enabled: true
Width: 2
Layout/LineLength:
AllowHeredoc: true
AllowURI: true
AutoCorrect: false
Max: 120
URISchemes:
- http
- https
- mysql
- mysql2
- postgres
- postgresql
Layout/MultilineArrayLineBreaks:
Enabled: true
Layout/MultilineBlockLayout:
Enabled: true
Layout/MultilineHashBraceLayout:
Enabled: true
Layout/MultilineHashKeyLineBreaks:
Enabled: true
Layout/MultilineMethodArgumentLineBreaks:
Enabled: true
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: new_line
Layout/ParameterAlignment:
Enabled: true
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/DuplicateElsifCondition:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
- '**/*.gemspec'
Metrics/ClassLength:
Max: 150
Metrics/MethodLength:
Max: 15
Metrics/ModuleLength:
Exclude:
- 'spec/**/*.rb'
RSpec/ExampleLength:
Max: 10
RSpec/NestedGroups:
Max: 7
RSpec/PredicateMatcher:
Enabled: true
Strict: false
EnforcedStyle: inflected
Style/AccessorGrouping:
Enabled: true
Style/Alias:
EnforcedStyle: prefer_alias_method
Style/ArrayCoercion:
Enabled: false
Style/BisectedAttrAccessor:
Enabled: true
Style/BlockDelimiters:
Enabled: true
Style/CaseLikeIf:
Enabled: true
Style/DoubleNegation:
Enabled: false
Style/ExponentialNotation:
Enabled: true
Style/FrozenStringLiteralComment:
Enabled: false
Style/HashAsLastArrayItem:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashLikeCase:
Enabled: true
Style/HashSyntax:
Enabled: true
EnforcedStyle: hash_rockets
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/RedundantAssignment:
Enabled: true
Style/RedundantFetchBlock:
Enabled: true
Style/RedundantFileExtensionInRequire:
Enabled: true
Style/RedundantRegexpCharacterClass:
Enabled: true
Style/RedundantRegexpEscape:
Enabled: true
Style/SignalException:
EnforcedStyle: semantic
Style/SlicingWithRange:
Enabled: true