rubocop-govuk 3.3.1 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +7 -3
- data/config/bundler.yml +12 -0
- data/config/default.yml +11 -6
- data/config/layout.yml +51 -0
- data/config/lint.yml +5 -0
- data/config/metrics.yml +79 -0
- data/config/naming.yml +25 -0
- data/config/rails.yml +10 -12
- data/config/rake.yml +1 -0
- data/config/style.yml +284 -0
- metadata +26 -10
- data/config/gds-ruby-styleguide.yml +0 -337
- data/config/other-excludes.yml +0 -23
- data/config/other-lint.yml +0 -129
- data/config/other-metrics.yml +0 -11
- data/config/other-style.yml +0 -385
data/config/other-metrics.yml
DELETED
data/config/other-style.yml
DELETED
@@ -1,385 +0,0 @@
|
|
1
|
-
Layout/AccessModifierIndentation:
|
2
|
-
Description: Check indentation of private/protected visibility modifiers.
|
3
|
-
Enabled: true
|
4
|
-
EnforcedStyle: outdent
|
5
|
-
|
6
|
-
Naming/AccessorMethodName:
|
7
|
-
Description: Check the naming of accessor methods for get_/set_.
|
8
|
-
Enabled: false
|
9
|
-
|
10
|
-
Style/Alias:
|
11
|
-
Description: 'Use alias_method instead of alias.'
|
12
|
-
Enabled: false
|
13
|
-
|
14
|
-
Layout/HashAlignment:
|
15
|
-
Description: >-
|
16
|
-
Align the elements of a hash literal if they span more than
|
17
|
-
one line.
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
Layout/ParameterAlignment:
|
21
|
-
Description: >-
|
22
|
-
Align the parameters of a method call if they span more
|
23
|
-
than one line.
|
24
|
-
Enabled: false
|
25
|
-
|
26
|
-
Style/ArrayJoin:
|
27
|
-
Description: 'Use Array#join instead of Array#*.'
|
28
|
-
Enabled: false
|
29
|
-
|
30
|
-
Style/AsciiComments:
|
31
|
-
Description: 'Use only ascii symbols in comments.'
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
Naming/AsciiIdentifiers:
|
35
|
-
Description: 'Use only ascii symbols in identifiers.'
|
36
|
-
Enabled: false
|
37
|
-
|
38
|
-
Style/Attr:
|
39
|
-
Description: 'Checks for uses of Module#attr.'
|
40
|
-
Enabled: false
|
41
|
-
|
42
|
-
Style/BeginBlock:
|
43
|
-
Description: 'Avoid the use of BEGIN blocks.'
|
44
|
-
Enabled: false
|
45
|
-
|
46
|
-
Style/BlockComments:
|
47
|
-
Description: 'Do not use block comments.'
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Metrics/BlockNesting:
|
51
|
-
Description: 'Avoid excessive block nesting'
|
52
|
-
Enabled: false
|
53
|
-
|
54
|
-
Style/BlockDelimiters:
|
55
|
-
Description: >-
|
56
|
-
Avoid using {...} for multi-line blocks (multiline chaining is
|
57
|
-
always ugly).
|
58
|
-
Prefer {...} over do...end for single-line blocks.
|
59
|
-
Enabled: false
|
60
|
-
|
61
|
-
Style/CaseEquality:
|
62
|
-
Description: 'Avoid explicit use of the case equality operator(===).'
|
63
|
-
Enabled: false
|
64
|
-
|
65
|
-
Style/CharacterLiteral:
|
66
|
-
Description: 'Checks for uses of character literals.'
|
67
|
-
Enabled: false
|
68
|
-
|
69
|
-
Style/ClassAndModuleChildren:
|
70
|
-
Description: 'Checks style of children classes and modules.'
|
71
|
-
Enabled: false
|
72
|
-
|
73
|
-
Metrics/ClassLength:
|
74
|
-
Description: 'Avoid classes longer than 100 lines of code.'
|
75
|
-
Enabled: false
|
76
|
-
|
77
|
-
Style/CollectionMethods:
|
78
|
-
Description: 'Preferred collection methods.'
|
79
|
-
Enabled: false
|
80
|
-
|
81
|
-
Style/ColonMethodCall:
|
82
|
-
Description: 'Do not use :: for method call.'
|
83
|
-
Enabled: false
|
84
|
-
|
85
|
-
Style/CommentAnnotation:
|
86
|
-
Description: >-
|
87
|
-
Checks formatting of special comments
|
88
|
-
(TODO, FIXME, OPTIMIZE, HACK, REVIEW).
|
89
|
-
Enabled: false
|
90
|
-
|
91
|
-
Layout/CommentIndentation:
|
92
|
-
Description: 'Indentation of comments.'
|
93
|
-
Enabled: false
|
94
|
-
|
95
|
-
Metrics/CyclomaticComplexity:
|
96
|
-
Description: 'Avoid complex methods.'
|
97
|
-
Enabled: false
|
98
|
-
|
99
|
-
Style/PreferredHashMethods:
|
100
|
-
Description: 'Checks for use of deprecated Hash methods.'
|
101
|
-
Enabled: false
|
102
|
-
|
103
|
-
Style/Documentation:
|
104
|
-
Description: 'Document classes and non-namespace modules.'
|
105
|
-
Enabled: false
|
106
|
-
|
107
|
-
Layout/DotPosition:
|
108
|
-
Description: 'Checks the position of the dot in multi-line method calls.'
|
109
|
-
Enabled: false
|
110
|
-
|
111
|
-
Style/DoubleNegation:
|
112
|
-
Description: 'Checks for uses of double negation (!!).'
|
113
|
-
Enabled: false
|
114
|
-
|
115
|
-
Style/EachWithObject:
|
116
|
-
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
117
|
-
Enabled: false
|
118
|
-
|
119
|
-
Layout/EmptyLinesAroundAccessModifier:
|
120
|
-
Description: "Keep blank lines around access modifiers."
|
121
|
-
Enabled: true
|
122
|
-
|
123
|
-
Layout/EmptyLines:
|
124
|
-
Description: "Keeps track of empty lines around expression bodies."
|
125
|
-
Enabled: false
|
126
|
-
|
127
|
-
Style/EmptyLiteral:
|
128
|
-
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
129
|
-
Enabled: false
|
130
|
-
|
131
|
-
Style/Encoding:
|
132
|
-
Description: 'Use UTF-8 as the source file encoding.'
|
133
|
-
Enabled: false
|
134
|
-
|
135
|
-
Style/EndBlock:
|
136
|
-
Description: 'Avoid the use of END blocks.'
|
137
|
-
Enabled: false
|
138
|
-
|
139
|
-
Style/EvenOdd:
|
140
|
-
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
141
|
-
Enabled: false
|
142
|
-
|
143
|
-
Naming/FileName:
|
144
|
-
Description: 'Use snake_case for source file names.'
|
145
|
-
Enabled: false
|
146
|
-
|
147
|
-
Lint/FlipFlop:
|
148
|
-
Description: 'Checks for flip flops'
|
149
|
-
Enabled: false
|
150
|
-
|
151
|
-
Style/FormatString:
|
152
|
-
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
153
|
-
Enabled: false
|
154
|
-
|
155
|
-
Style/GlobalVars:
|
156
|
-
Description: 'Do not introduce global variables.'
|
157
|
-
Enabled: false
|
158
|
-
|
159
|
-
Style/GuardClause:
|
160
|
-
Description: 'Check for conditionals that can be replaced with guard clauses'
|
161
|
-
Enabled: false
|
162
|
-
|
163
|
-
Style/IfWithSemicolon:
|
164
|
-
Description: 'Never use if x; .... Use the ternary operator instead.'
|
165
|
-
Enabled: false
|
166
|
-
|
167
|
-
Layout/FirstArrayElementIndentation:
|
168
|
-
Description: >-
|
169
|
-
Checks the indentation of the first element in an array
|
170
|
-
literal.
|
171
|
-
Enabled: false
|
172
|
-
|
173
|
-
Layout/FirstHashElementIndentation:
|
174
|
-
Description: 'Checks the indentation of the first key in a hash literal.'
|
175
|
-
Enabled: false
|
176
|
-
|
177
|
-
Style/Lambda:
|
178
|
-
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
179
|
-
Enabled: false
|
180
|
-
|
181
|
-
Style/LambdaCall:
|
182
|
-
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
183
|
-
Enabled: false
|
184
|
-
|
185
|
-
Layout/LeadingCommentSpace:
|
186
|
-
Description: 'Comments should start with a space.'
|
187
|
-
Enabled: false
|
188
|
-
|
189
|
-
Style/LineEndConcatenation:
|
190
|
-
Description: >-
|
191
|
-
Use \ instead of + or << to concatenate two string literals at
|
192
|
-
line end.
|
193
|
-
Enabled: false
|
194
|
-
|
195
|
-
Style/MethodDefParentheses:
|
196
|
-
Description: >-
|
197
|
-
Checks if the method definitions have or don't have
|
198
|
-
parentheses.
|
199
|
-
Enabled: false
|
200
|
-
|
201
|
-
Metrics/MethodLength:
|
202
|
-
Description: 'Avoid methods longer than 10 lines of code.'
|
203
|
-
Enabled: false
|
204
|
-
|
205
|
-
Style/ModuleFunction:
|
206
|
-
Description: 'Checks for usage of `extend self` in modules.'
|
207
|
-
Enabled: false
|
208
|
-
|
209
|
-
Layout/MultilineOperationIndentation:
|
210
|
-
EnforcedStyle: indented
|
211
|
-
|
212
|
-
Style/NegatedIf:
|
213
|
-
Description: >-
|
214
|
-
Favor unless over if for negative conditions
|
215
|
-
(or control flow or).
|
216
|
-
Enabled: false
|
217
|
-
|
218
|
-
Style/NegatedWhile:
|
219
|
-
Description: 'Favor until over while for negative conditions.'
|
220
|
-
Enabled: false
|
221
|
-
|
222
|
-
Style/Next:
|
223
|
-
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
224
|
-
Enabled: false
|
225
|
-
|
226
|
-
Style/NilComparison:
|
227
|
-
Description: 'Prefer x.nil? to x == nil.'
|
228
|
-
Enabled: false
|
229
|
-
|
230
|
-
Style/NonNilCheck:
|
231
|
-
Description: 'Checks for redundant nil checks.'
|
232
|
-
Enabled: false
|
233
|
-
|
234
|
-
Style/Not:
|
235
|
-
Description: 'Use ! instead of not.'
|
236
|
-
Enabled: false
|
237
|
-
|
238
|
-
Style/NumericLiterals:
|
239
|
-
Description: >-
|
240
|
-
Add underscores to large numeric literals to improve their
|
241
|
-
readability.
|
242
|
-
Enabled: false
|
243
|
-
|
244
|
-
Metrics/ParameterLists:
|
245
|
-
Description: 'Avoid parameter lists longer than three or four parameters.'
|
246
|
-
Enabled: false
|
247
|
-
|
248
|
-
Style/PercentLiteralDelimiters:
|
249
|
-
Description: 'Use `%`-literal delimiters consistently'
|
250
|
-
Enabled: false
|
251
|
-
|
252
|
-
Style/PerlBackrefs:
|
253
|
-
Description: 'Avoid Perl-style regex back references.'
|
254
|
-
Enabled: false
|
255
|
-
|
256
|
-
Naming/PredicateName:
|
257
|
-
Description: 'Check the names of predicate methods.'
|
258
|
-
Enabled: false
|
259
|
-
|
260
|
-
Style/Proc:
|
261
|
-
Description: 'Use proc instead of Proc.new.'
|
262
|
-
Enabled: false
|
263
|
-
|
264
|
-
Style/RaiseArgs:
|
265
|
-
Description: 'Checks the arguments passed to raise/fail.'
|
266
|
-
Enabled: false
|
267
|
-
|
268
|
-
Style/RedundantBegin:
|
269
|
-
Description: "Don't use begin blocks when they are not needed."
|
270
|
-
Enabled: false
|
271
|
-
|
272
|
-
Style/RedundantException:
|
273
|
-
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
274
|
-
Enabled: false
|
275
|
-
|
276
|
-
Style/RedundantSelf:
|
277
|
-
Description: "Don't use self where it's not needed."
|
278
|
-
Enabled: false
|
279
|
-
|
280
|
-
Style/RegexpLiteral:
|
281
|
-
Description: >-
|
282
|
-
Use %r for regular expressions matching more than
|
283
|
-
`MaxSlashes` '/' characters.
|
284
|
-
Use %r only for regular expressions matching more than
|
285
|
-
`MaxSlashes` '/' character.
|
286
|
-
Enabled: false
|
287
|
-
|
288
|
-
Style/RescueModifier:
|
289
|
-
Description: 'Avoid using rescue in its modifier form.'
|
290
|
-
Enabled: false
|
291
|
-
|
292
|
-
Style/SafeNavigation:
|
293
|
-
Description: >-
|
294
|
-
This cop transforms usages of a method call safeguarded by a check for the
|
295
|
-
existance of the object to safe navigation (`&.`).
|
296
|
-
Enabled: false
|
297
|
-
|
298
|
-
Style/SelfAssignment:
|
299
|
-
Description: 'Checks for places where self-assignment shorthand should have been used.'
|
300
|
-
Enabled: false
|
301
|
-
|
302
|
-
Style/Semicolon:
|
303
|
-
Description: "Don't use semicolons to terminate expressions."
|
304
|
-
Enabled: false
|
305
|
-
|
306
|
-
Style/SignalException:
|
307
|
-
Description: 'Checks for proper usage of fail and raise.'
|
308
|
-
Enabled: false
|
309
|
-
|
310
|
-
Style/SingleLineBlockParams:
|
311
|
-
Description: 'Enforces the names of some block params.'
|
312
|
-
Enabled: false
|
313
|
-
|
314
|
-
Style/SingleLineMethods:
|
315
|
-
Description: 'Avoid single-line methods.'
|
316
|
-
Enabled: false
|
317
|
-
|
318
|
-
Layout/SpaceBeforeFirstArg:
|
319
|
-
Description: >-
|
320
|
-
Checks that exactly one space is used between a method name
|
321
|
-
and the first argument for method calls without parentheses.
|
322
|
-
Enabled: false
|
323
|
-
|
324
|
-
Layout/SpaceAroundKeyword:
|
325
|
-
Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
|
326
|
-
Enabled: false
|
327
|
-
|
328
|
-
Layout/SpaceAfterNot:
|
329
|
-
Description: Tracks redundant space after the ! operator.
|
330
|
-
Enabled: false
|
331
|
-
|
332
|
-
Layout/SpaceBeforeComment:
|
333
|
-
Description: >-
|
334
|
-
Checks for missing space between code and a comment on the
|
335
|
-
same line.
|
336
|
-
Enabled: false
|
337
|
-
|
338
|
-
Layout/SpaceInsideBlockBraces:
|
339
|
-
Description: >-
|
340
|
-
Checks that block braces have or don't have surrounding space.
|
341
|
-
For blocks taking parameters, checks that the left brace has
|
342
|
-
or doesn't have trailing space.
|
343
|
-
Enabled: true
|
344
|
-
|
345
|
-
Layout/SpaceInsideHashLiteralBraces:
|
346
|
-
Description: "Use spaces inside hash literal braces - or don't."
|
347
|
-
Enabled: true
|
348
|
-
|
349
|
-
Style/SpecialGlobalVars:
|
350
|
-
Description: 'Avoid Perl-style global variables.'
|
351
|
-
Enabled: false
|
352
|
-
|
353
|
-
Style/RedundantCapitalW:
|
354
|
-
Description: 'Checks for %W when interpolation is not needed.'
|
355
|
-
Enabled: false
|
356
|
-
|
357
|
-
Style/CommandLiteral:
|
358
|
-
Description: 'Checks for %x when `` would do.'
|
359
|
-
Enabled: false
|
360
|
-
|
361
|
-
Style/VariableInterpolation:
|
362
|
-
Description: >-
|
363
|
-
Don't interpolate global, instance and class variables
|
364
|
-
directly in strings.
|
365
|
-
Enabled: false
|
366
|
-
|
367
|
-
Style/WhenThen:
|
368
|
-
Description: 'Use when x then ... for one-line cases.'
|
369
|
-
Enabled: false
|
370
|
-
|
371
|
-
Style/WhileUntilDo:
|
372
|
-
Description: 'Checks for redundant do after while or until.'
|
373
|
-
Enabled: false
|
374
|
-
|
375
|
-
Style/WhileUntilModifier:
|
376
|
-
Description: >-
|
377
|
-
Favor modifier while/until usage when you have a
|
378
|
-
single-line body.
|
379
|
-
Enabled: false
|
380
|
-
|
381
|
-
Style/FrozenStringLiteralComment:
|
382
|
-
Enabled: false
|
383
|
-
|
384
|
-
Style/HashEachMethods:
|
385
|
-
Enabled: true
|