dvla-lint 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/workflows/gem-push.yml +48 -0
- data/.github/workflows/gem-test.yml +22 -0
- data/.gitignore +19 -0
- data/.rspec +3 -0
- data/.rubocop.yml +26 -0
- data/.ruby-version +1 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +32 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/dvla-lint.gemspec +41 -0
- data/exe/dvla-lint +66 -0
- data/lib/dvla/lint/version.rb +7 -0
- data/lib/dvla/lint.rb +13 -0
- data/rules/dvla-ruby-styleguide.yml +663 -0
- data/rules/other-excludes.yml +19 -0
- data/rules/other-gemspec.yml +7 -0
- data/rules/other-lint.yml +161 -0
- data/rules/other-metrics.yml +11 -0
- data/rules/other-rails.yml +42 -0
- data/rules/other-security.yml +3 -0
- data/rules/other-style.yml +522 -0
- metadata +197 -0
@@ -0,0 +1,522 @@
|
|
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
|
+
Style/EmptyHeredoc:
|
92
|
+
Description: Checks for using empty heredoc to reduce redundancy.
|
93
|
+
Enabled: false
|
94
|
+
|
95
|
+
Style/MagicCommentFormat:
|
96
|
+
Description: Ensures magic comments are written consistently throughout your code base.
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
Style/MapCompactWithConditionalBlock:
|
100
|
+
Description: Prefer `select` or `reject` over `map { ... }.compact`.
|
101
|
+
Enabled: false
|
102
|
+
|
103
|
+
Layout/CommentIndentation:
|
104
|
+
Description: 'Indentation of comments.'
|
105
|
+
Enabled: false
|
106
|
+
|
107
|
+
Metrics/CyclomaticComplexity:
|
108
|
+
Description: 'Avoid complex methods.'
|
109
|
+
Enabled: false
|
110
|
+
|
111
|
+
Style/PreferredHashMethods:
|
112
|
+
Description: 'Checks for use of deprecated Hash methods.'
|
113
|
+
Enabled: false
|
114
|
+
|
115
|
+
Style/Documentation:
|
116
|
+
Description: 'Document classes and non-namespace modules.'
|
117
|
+
Enabled: false
|
118
|
+
|
119
|
+
Layout/DotPosition:
|
120
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
121
|
+
Enabled: false
|
122
|
+
|
123
|
+
Style/DoubleNegation:
|
124
|
+
Description: 'Checks for uses of double negation (!!).'
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
Style/EachWithObject:
|
128
|
+
Description: 'Prefer `each_with_object` over `inject` or `reduce`.'
|
129
|
+
Enabled: false
|
130
|
+
|
131
|
+
Layout/EmptyLinesAroundAccessModifier:
|
132
|
+
Description: "Keep blank lines around access modifiers."
|
133
|
+
Enabled: true
|
134
|
+
|
135
|
+
Layout/EmptyLines:
|
136
|
+
Description: "Keeps track of empty lines around expression bodies."
|
137
|
+
Enabled: false
|
138
|
+
|
139
|
+
Style/EmptyLiteral:
|
140
|
+
Description: 'Prefer literals to Array.new/Hash.new/String.new.'
|
141
|
+
Enabled: false
|
142
|
+
|
143
|
+
Style/Encoding:
|
144
|
+
Description: 'Use UTF-8 as the source file encoding.'
|
145
|
+
Enabled: false
|
146
|
+
|
147
|
+
Style/EndBlock:
|
148
|
+
Description: 'Avoid the use of END blocks.'
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
Style/EvenOdd:
|
152
|
+
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
|
153
|
+
Enabled: false
|
154
|
+
|
155
|
+
Naming/FileName:
|
156
|
+
Description: 'Use snake_case for source file names.'
|
157
|
+
Enabled: false
|
158
|
+
|
159
|
+
Lint/FlipFlop:
|
160
|
+
Description: 'Checks for flip flops'
|
161
|
+
Enabled: false
|
162
|
+
|
163
|
+
Style/FormatString:
|
164
|
+
Description: 'Enforce the use of Kernel#sprintf, Kernel#format or String#%.'
|
165
|
+
Enabled: false
|
166
|
+
|
167
|
+
Style/GlobalVars:
|
168
|
+
Description: 'Do not introduce global variables.'
|
169
|
+
Enabled: false
|
170
|
+
|
171
|
+
Style/GuardClause:
|
172
|
+
Description: 'Check for conditionals that can be replaced with guard clauses'
|
173
|
+
Enabled: false
|
174
|
+
|
175
|
+
Style/IfWithSemicolon:
|
176
|
+
Description: 'Never use if x; .... Use the ternary operator instead.'
|
177
|
+
Enabled: false
|
178
|
+
|
179
|
+
Layout/FirstArrayElementIndentation:
|
180
|
+
Description: >-
|
181
|
+
Checks the indentation of the first element in an array
|
182
|
+
literal.
|
183
|
+
Enabled: false
|
184
|
+
|
185
|
+
Layout/FirstHashElementIndentation:
|
186
|
+
Description: 'Checks the indentation of the first key in a hash literal.'
|
187
|
+
Enabled: false
|
188
|
+
|
189
|
+
Style/Lambda:
|
190
|
+
Description: 'Use the new lambda literal syntax for single-line blocks.'
|
191
|
+
Enabled: false
|
192
|
+
|
193
|
+
Style/LambdaCall:
|
194
|
+
Description: 'Use lambda.call(...) instead of lambda.(...).'
|
195
|
+
Enabled: false
|
196
|
+
|
197
|
+
Layout/LeadingCommentSpace:
|
198
|
+
Description: 'Comments should start with a space.'
|
199
|
+
Enabled: false
|
200
|
+
|
201
|
+
Style/LineEndConcatenation:
|
202
|
+
Description: >-
|
203
|
+
Use \ instead of + or << to concatenate two string literals at
|
204
|
+
line end.
|
205
|
+
Enabled: false
|
206
|
+
|
207
|
+
Style/MethodDefParentheses:
|
208
|
+
Description: >-
|
209
|
+
Checks if the method definitions have or don't have
|
210
|
+
parentheses.
|
211
|
+
Enabled: false
|
212
|
+
|
213
|
+
Metrics/MethodLength:
|
214
|
+
Description: 'Avoid methods longer than 10 lines of code.'
|
215
|
+
Enabled: false
|
216
|
+
|
217
|
+
Style/ModuleFunction:
|
218
|
+
Description: 'Checks for usage of `extend self` in modules.'
|
219
|
+
Enabled: false
|
220
|
+
|
221
|
+
Layout/MultilineOperationIndentation:
|
222
|
+
EnforcedStyle: indented
|
223
|
+
|
224
|
+
Style/NegatedIf:
|
225
|
+
Description: >-
|
226
|
+
Favor unless over if for negative conditions
|
227
|
+
(or control flow or).
|
228
|
+
Enabled: false
|
229
|
+
|
230
|
+
Style/NegatedWhile:
|
231
|
+
Description: 'Favor until over while for negative conditions.'
|
232
|
+
Enabled: false
|
233
|
+
|
234
|
+
Style/Next:
|
235
|
+
Description: 'Use `next` to skip iteration instead of a condition at the end.'
|
236
|
+
Enabled: false
|
237
|
+
|
238
|
+
Style/NilComparison:
|
239
|
+
Description: 'Prefer x.nil? to x == nil.'
|
240
|
+
Enabled: false
|
241
|
+
|
242
|
+
Style/NonNilCheck:
|
243
|
+
Description: 'Checks for redundant nil checks.'
|
244
|
+
Enabled: false
|
245
|
+
|
246
|
+
Style/Not:
|
247
|
+
Description: 'Use ! instead of not.'
|
248
|
+
Enabled: false
|
249
|
+
|
250
|
+
Style/NumericLiterals:
|
251
|
+
Description: >-
|
252
|
+
Add underscores to large numeric literals to improve their
|
253
|
+
readability.
|
254
|
+
Enabled: false
|
255
|
+
|
256
|
+
Metrics/ParameterLists:
|
257
|
+
Description: 'Avoid parameter lists longer than three or four parameters.'
|
258
|
+
Enabled: false
|
259
|
+
|
260
|
+
Style/PercentLiteralDelimiters:
|
261
|
+
Description: 'Use `%`-literal delimiters consistently'
|
262
|
+
Enabled: false
|
263
|
+
|
264
|
+
Style/PerlBackrefs:
|
265
|
+
Description: 'Avoid Perl-style regex back references.'
|
266
|
+
Enabled: false
|
267
|
+
|
268
|
+
Naming/PredicateName:
|
269
|
+
Description: 'Check the names of predicate methods.'
|
270
|
+
Enabled: false
|
271
|
+
|
272
|
+
Style/Proc:
|
273
|
+
Description: 'Use proc instead of Proc.new.'
|
274
|
+
Enabled: false
|
275
|
+
|
276
|
+
Style/RaiseArgs:
|
277
|
+
Description: 'Checks the arguments passed to raise/fail.'
|
278
|
+
Enabled: false
|
279
|
+
|
280
|
+
Style/RedundantBegin:
|
281
|
+
Description: "Don't use begin blocks when they are not needed."
|
282
|
+
Enabled: false
|
283
|
+
|
284
|
+
Style/RedundantException:
|
285
|
+
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
|
286
|
+
Enabled: false
|
287
|
+
|
288
|
+
Style/RedundantSelf:
|
289
|
+
Description: "Don't use self where it's not needed."
|
290
|
+
Enabled: false
|
291
|
+
|
292
|
+
Style/RegexpLiteral:
|
293
|
+
Description: >-
|
294
|
+
Use %r for regular expressions matching more than
|
295
|
+
`MaxSlashes` '/' characters.
|
296
|
+
Use %r only for regular expressions matching more than
|
297
|
+
`MaxSlashes` '/' character.
|
298
|
+
Enabled: false
|
299
|
+
|
300
|
+
Style/RescueModifier:
|
301
|
+
Description: 'Avoid using rescue in its modifier form.'
|
302
|
+
Enabled: false
|
303
|
+
|
304
|
+
Style/SafeNavigation:
|
305
|
+
Description: >-
|
306
|
+
This cop transforms usages of a method call safeguarded by a check for the
|
307
|
+
existance of the object to safe navigation (`&.`).
|
308
|
+
Enabled: false
|
309
|
+
|
310
|
+
Style/SelfAssignment:
|
311
|
+
Description: 'Checks for places where self-assignment shorthand should have been used.'
|
312
|
+
Enabled: false
|
313
|
+
|
314
|
+
Style/Semicolon:
|
315
|
+
Description: "Don't use semicolons to terminate expressions."
|
316
|
+
Enabled: false
|
317
|
+
|
318
|
+
Style/SignalException:
|
319
|
+
Description: 'Checks for proper usage of fail and raise.'
|
320
|
+
Enabled: false
|
321
|
+
|
322
|
+
Style/SingleLineBlockParams:
|
323
|
+
Description: 'Enforces the names of some block params.'
|
324
|
+
Enabled: false
|
325
|
+
|
326
|
+
Style/SingleLineMethods:
|
327
|
+
Description: 'Avoid single-line methods.'
|
328
|
+
Enabled: false
|
329
|
+
|
330
|
+
Layout/SpaceBeforeFirstArg:
|
331
|
+
Description: >-
|
332
|
+
Checks that exactly one space is used between a method name
|
333
|
+
and the first argument for method calls without parentheses.
|
334
|
+
Enabled: false
|
335
|
+
|
336
|
+
Layout/SpaceAroundKeyword:
|
337
|
+
Description: 'Use spaces after if/elsif/unless/while/until/case/when.'
|
338
|
+
Enabled: false
|
339
|
+
|
340
|
+
Layout/SpaceAfterNot:
|
341
|
+
Description: Tracks redundant space after the ! operator.
|
342
|
+
Enabled: false
|
343
|
+
|
344
|
+
Layout/SpaceBeforeComment:
|
345
|
+
Description: >-
|
346
|
+
Checks for missing space between code and a comment on the
|
347
|
+
same line.
|
348
|
+
Enabled: false
|
349
|
+
|
350
|
+
Layout/SpaceInsideBlockBraces:
|
351
|
+
Description: >-
|
352
|
+
Checks that block braces have or don't have surrounding space.
|
353
|
+
For blocks taking parameters, checks that the left brace has
|
354
|
+
or doesn't have trailing space.
|
355
|
+
Enabled: true
|
356
|
+
|
357
|
+
Layout/SpaceInsideHashLiteralBraces:
|
358
|
+
Description: "Use spaces inside hash literal braces - or don't."
|
359
|
+
Enabled: true
|
360
|
+
|
361
|
+
Style/SpecialGlobalVars:
|
362
|
+
Description: 'Avoid Perl-style global variables.'
|
363
|
+
Enabled: false
|
364
|
+
|
365
|
+
Style/RedundantCapitalW:
|
366
|
+
Description: 'Checks for %W when interpolation is not needed.'
|
367
|
+
Enabled: false
|
368
|
+
|
369
|
+
Style/CommandLiteral:
|
370
|
+
Description: 'Checks for %x when `` would do.'
|
371
|
+
Enabled: false
|
372
|
+
|
373
|
+
Style/VariableInterpolation:
|
374
|
+
Description: >-
|
375
|
+
Don't interpolate global, instance and class variables
|
376
|
+
directly in strings.
|
377
|
+
Enabled: false
|
378
|
+
|
379
|
+
Style/WhenThen:
|
380
|
+
Description: 'Use when x then ... for one-line cases.'
|
381
|
+
Enabled: false
|
382
|
+
|
383
|
+
Style/WhileUntilDo:
|
384
|
+
Description: 'Checks for redundant do after while or until.'
|
385
|
+
Enabled: false
|
386
|
+
|
387
|
+
Style/WhileUntilModifier:
|
388
|
+
Description: >-
|
389
|
+
Favor modifier while/until usage when you have a
|
390
|
+
single-line body.
|
391
|
+
Enabled: false
|
392
|
+
|
393
|
+
Style/FrozenStringLiteralComment:
|
394
|
+
Enabled: false
|
395
|
+
|
396
|
+
Style/MissingElse:
|
397
|
+
Enabled: true
|
398
|
+
EnforcedStyle: case
|
399
|
+
|
400
|
+
Style/EnvHome: # new in 1.29
|
401
|
+
Description: Checks for consistent usage of ENV['HOME']
|
402
|
+
Enabled: false
|
403
|
+
|
404
|
+
Style/FetchEnvVar: # new in 1.28
|
405
|
+
Description: Suggests ENV.fetch for the replacement of ENV[]
|
406
|
+
Enabled: true
|
407
|
+
|
408
|
+
Style/ObjectThen: # new in 1.28
|
409
|
+
Description: Enforces the use of consistent method names Object#yield_self or Object#then
|
410
|
+
EnforcedStyle: then
|
411
|
+
Enabled: true
|
412
|
+
|
413
|
+
Style/RedundantInitialize: # new in 1.27
|
414
|
+
Description: Checks for initialize methods that are redundant
|
415
|
+
Enabled: false
|
416
|
+
|
417
|
+
Style/ArrayIntersect: # new in 1.40
|
418
|
+
Description: Checks for duplicated magic comments
|
419
|
+
Enabled: true
|
420
|
+
|
421
|
+
Style/ComparableClamp: # new in 1.44
|
422
|
+
Description: Enforces the use of Comparable#clamp instead of comparison by minimum and maximum
|
423
|
+
Enabled: true
|
424
|
+
|
425
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
426
|
+
Description: Enforces the use of Array#push(item) instead of Array#concat([item]) to avoid redundant array literals
|
427
|
+
Enabled: false
|
428
|
+
|
429
|
+
Style/MapToSet: # new in 1.42
|
430
|
+
Description: Looks for uses of map.to_set or collect.to_set that could be written with just to_set.
|
431
|
+
Enabled: false
|
432
|
+
|
433
|
+
Style/MinMaxComparison: # new in 1.42
|
434
|
+
Description: Enforces the use of max or min instead of comparison for greater or less
|
435
|
+
Enabled: true
|
436
|
+
|
437
|
+
Style/OperatorMethodCall: # new in 1.37
|
438
|
+
Description: Checks for redundant dot before operator method call
|
439
|
+
Enabled: true
|
440
|
+
|
441
|
+
Style/RedundantConstantBase: # new in 1.40
|
442
|
+
Description: "Avoid redundant :: prefix on constant"
|
443
|
+
Enabled: true
|
444
|
+
|
445
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
446
|
+
Description: Checks for redundant uses of double splat hash braces
|
447
|
+
Enabled: true
|
448
|
+
|
449
|
+
Style/RedundantEach: # new in 1.38
|
450
|
+
Description: Checks for redundant each
|
451
|
+
Enabled: false
|
452
|
+
|
453
|
+
Style/RedundantStringEscape: # new in 1.37
|
454
|
+
Description: Checks for redundant escapes in string literals
|
455
|
+
Enabled: true
|
456
|
+
|
457
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53.0
|
458
|
+
Description: Checks for uses a redundant current directory in path.
|
459
|
+
Enabled: true
|
460
|
+
|
461
|
+
Style/RedundantRegexpArgument: # new in 1.53.0
|
462
|
+
Description: Identifies places where argument can be replaced from a deterministic regexp to a string.
|
463
|
+
Enabled: true
|
464
|
+
|
465
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53.0
|
466
|
+
Description: Checks if return or return nil is used in predicate method definitions.
|
467
|
+
Enabled: true
|
468
|
+
|
469
|
+
Style/YAMLFileRead: # new in 1.53.0
|
470
|
+
Description: Checks for the use of YAML.load, YAML.safe_load, and YAML.parse with File.read argument.
|
471
|
+
Enabled: true
|
472
|
+
|
473
|
+
Style/MultipleComparison: # new in 0.49.0
|
474
|
+
Description: Checks against comparing a variable with multiple items, where Array#include?, Set#include? or a case
|
475
|
+
could be used instead to avoid code repetition. It accepts comparisons of multiple method calls to avoid unnecessary
|
476
|
+
method calls by default. It can be configured by AllowMethodComparison option.
|
477
|
+
Enabled: true
|
478
|
+
|
479
|
+
Style/RedundantArrayConstructor: # new in 1.52.0
|
480
|
+
Description: Checks for the instantiation of array using redundant Array constructor. Autocorrect replaces to array
|
481
|
+
literal which is the simplest and fastest.
|
482
|
+
Enabled: true
|
483
|
+
|
484
|
+
Style/RedundantRegexpConstructor: # new in 1.52.0
|
485
|
+
Description: Checks for the instantiation of regexp using redundant Regexp.new or Regexp.compile. Autocorrect replaces
|
486
|
+
to regexp literal which is the simplest and fastest.
|
487
|
+
Enabled: true
|
488
|
+
|
489
|
+
Style/RedundantFilterChain: # new in 1.52.0
|
490
|
+
Description: Identifies usages of any?, empty? or none? predicate methods chained to select/filter/find_all and change
|
491
|
+
them to use predicate method instead.
|
492
|
+
Enabled: true
|
493
|
+
|
494
|
+
Style/ExactRegexpMatch: # new in 1.51.0
|
495
|
+
Description: Checks for exact regexp match inside Regexp literals.
|
496
|
+
Enabled: true
|
497
|
+
|
498
|
+
Style/RedundantLineContinuation: # new in 1.49.0
|
499
|
+
Description: Check for redundant line continuation.
|
500
|
+
Enabled: true
|
501
|
+
|
502
|
+
Style/DataInheritance: # new in 1.49.0
|
503
|
+
Description: Checks for inheritance from Data.define to avoid creating the anonymous parent class.
|
504
|
+
Enabled: false # Required Ruby version: 3.2
|
505
|
+
|
506
|
+
Style/DirEmpty: # new in 1.48.0
|
507
|
+
Description: Prefer to use Dir.empty?('path/to/dir') when checking if a directory is empty.
|
508
|
+
Enabled: true
|
509
|
+
|
510
|
+
Style/FileEmpty: # new in 1.48.0
|
511
|
+
Description: Prefer to use File.empty?('path/to/file') when checking if a file is empty.
|
512
|
+
Enabled: true
|
513
|
+
|
514
|
+
Metrics/CollectionLiteralLength: # new in 1.47.0
|
515
|
+
Description: Checks for literals with extremely many entries. This is indicative of configuration or data that may be
|
516
|
+
better extracted somewhere else, like a database, fetched from an API, or read from a non-code file (CSV, JSON,
|
517
|
+
YAML, etc.).
|
518
|
+
Enabled: true
|
519
|
+
|
520
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45.0
|
521
|
+
Description: Checks for redundant heredoc delimiter quotes.
|
522
|
+
Enabled: true
|
metadata
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dvla-lint
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.7.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Driver and Vehicle Licensing Agency (DVLA)
|
8
|
+
- Nigel Brookes-Thomas
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain: []
|
12
|
+
date: 2023-12-15 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.0'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: pry
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0.12'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.12'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rake
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '13.0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '13.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3.0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rubocop
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '1.44'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.44'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: rubocop-performance
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '1.5'
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '1.5'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: rubocop-rails
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '2.17'
|
105
|
+
type: :runtime
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '2.17'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: tty-config
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0.5'
|
119
|
+
type: :runtime
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0.5'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: tty-prompt
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0.23'
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - "~>"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0.23'
|
140
|
+
description: The standard Rubocop rules for the DVLA
|
141
|
+
email:
|
142
|
+
- nigel.brookes-thomas@dvla.gov.uk
|
143
|
+
executables:
|
144
|
+
- dvla-lint
|
145
|
+
extensions: []
|
146
|
+
extra_rdoc_files: []
|
147
|
+
files:
|
148
|
+
- ".github/workflows/gem-push.yml"
|
149
|
+
- ".github/workflows/gem-test.yml"
|
150
|
+
- ".gitignore"
|
151
|
+
- ".rspec"
|
152
|
+
- ".rubocop.yml"
|
153
|
+
- ".ruby-version"
|
154
|
+
- Gemfile
|
155
|
+
- LICENSE
|
156
|
+
- README.md
|
157
|
+
- Rakefile
|
158
|
+
- bin/console
|
159
|
+
- bin/setup
|
160
|
+
- dvla-lint.gemspec
|
161
|
+
- exe/dvla-lint
|
162
|
+
- lib/dvla/lint.rb
|
163
|
+
- lib/dvla/lint/version.rb
|
164
|
+
- rules/dvla-ruby-styleguide.yml
|
165
|
+
- rules/other-excludes.yml
|
166
|
+
- rules/other-gemspec.yml
|
167
|
+
- rules/other-lint.yml
|
168
|
+
- rules/other-metrics.yml
|
169
|
+
- rules/other-rails.yml
|
170
|
+
- rules/other-security.yml
|
171
|
+
- rules/other-style.yml
|
172
|
+
homepage: https://github.com/dvla/dvla-lint-ruby
|
173
|
+
licenses: []
|
174
|
+
metadata:
|
175
|
+
allowed_push_host: https://rubygems.org
|
176
|
+
homepage_uri: https://github.com/dvla/dvla-lint-ruby
|
177
|
+
source_code_uri: https://github.com/dvla/dvla-lint-ruby
|
178
|
+
post_install_message:
|
179
|
+
rdoc_options: []
|
180
|
+
require_paths:
|
181
|
+
- lib
|
182
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
requirements: []
|
193
|
+
rubygems_version: 3.4.10
|
194
|
+
signing_key:
|
195
|
+
specification_version: 4
|
196
|
+
summary: Rubocop standard rules
|
197
|
+
test_files: []
|