standard 0.0.41 → 0.1.0
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 +4 -4
- data/Gemfile.lock +9 -8
- data/README.md +16 -4
- data/config/base.yml +198 -127
- data/config/ruby-2.2.yml +1 -1
- data/lib/standard/creates_config_store/sets_target_ruby_version.rb +1 -1
- data/lib/standard/version.rb +1 -1
- data/standard.gemspec +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98a71071833789cb57bf9e9e492e2119548adcf9ea6752d85f1fcc0761757587
|
4
|
+
data.tar.gz: ff8c402f23d7d622f7e13ad5288574095034b5ca92b55b0e3c7e93890e0c57de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bc2cc69438696f8030d24a4a53d571fc16cd01a1f96088dd77c621da12b2b9919741e3009a6124638af9b210f304d76588331b2c565188ae8d47d87b4c90c9e
|
7
|
+
data.tar.gz: 6cddf38bd3920ea49f25f3cab99d1514e2784e9d319971ba4c489c8a02238541c98e54a41beba4af69ec6c01c7b494f2a8ff188cdbefbbaa09b3953c9278f719
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standard (0.0
|
5
|
-
rubocop (~> 0.
|
4
|
+
standard (0.1.0)
|
5
|
+
rubocop (~> 0.72.0)
|
6
|
+
rubocop-performance (~> 1.4.0)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
@@ -21,24 +22,24 @@ GEM
|
|
21
22
|
pry (0.12.2)
|
22
23
|
coderay (~> 1.1.0)
|
23
24
|
method_source (~> 0.9.0)
|
24
|
-
psych (3.1.0)
|
25
25
|
rainbow (3.0.0)
|
26
26
|
rake (12.3.2)
|
27
|
-
rubocop (0.
|
27
|
+
rubocop (0.72.0)
|
28
28
|
jaro_winkler (~> 1.5.1)
|
29
29
|
parallel (~> 1.10)
|
30
|
-
parser (>= 2.
|
31
|
-
psych (>= 3.1.0)
|
30
|
+
parser (>= 2.6)
|
32
31
|
rainbow (>= 2.2.2, < 4.0)
|
33
32
|
ruby-progressbar (~> 1.7)
|
34
|
-
unicode-display_width (>= 1.4.0, < 1.
|
33
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
34
|
+
rubocop-performance (1.4.0)
|
35
|
+
rubocop (>= 0.71.0)
|
35
36
|
ruby-progressbar (1.10.1)
|
36
37
|
simplecov (0.16.1)
|
37
38
|
docile (~> 1.1)
|
38
39
|
json (>= 1.8, < 3)
|
39
40
|
simplecov-html (~> 0.10.0)
|
40
41
|
simplecov-html (0.10.2)
|
41
|
-
unicode-display_width (1.
|
42
|
+
unicode-display_width (1.6.0)
|
42
43
|
|
43
44
|
PLATFORMS
|
44
45
|
ruby
|
data/README.md
CHANGED
@@ -279,8 +279,8 @@ for details.
|
|
279
279
|
|
280
280
|
Because Standard wraps RuboCop, they share the same [runtime
|
281
281
|
requirements](https://github.com/rubocop-hq/rubocop#compatibility)—currently,
|
282
|
-
that's MRI 2.
|
283
|
-
it does allow you to lint codebases that target Ruby versions older than 2.
|
282
|
+
that's MRI 2.3 and newer. While Standard can't avoid this runtime requirement,
|
283
|
+
it does allow you to lint codebases that target Ruby versions older than 2.3 by
|
284
284
|
narrowing the ruleset somewhat.
|
285
285
|
|
286
286
|
Standard will default to telling RuboCop to target the currently running version
|
@@ -297,11 +297,11 @@ for an example.
|
|
297
297
|
|
298
298
|
It's a little confusing to consider, but the targeted Ruby version for linting
|
299
299
|
may or may not match the version of the runtime (suppose you're on Ruby 2.5.1,
|
300
|
-
but your library supports Ruby 2.
|
300
|
+
but your library supports Ruby 2.3.0). In this case, specify `ruby_version` and
|
301
301
|
you should be okay. However, note that if you target a _newer_ Ruby version than
|
302
302
|
the runtime, RuboCop may behave in surprising or inconsistent ways.
|
303
303
|
|
304
|
-
If you are targeting a Ruby older than 2.
|
304
|
+
If you are targeting a Ruby older than 2.3 and run into an issue, check out
|
305
305
|
Standard's [version-specific RuboCop
|
306
306
|
configurations](https://github.com/testdouble/standard/tree/master/config) and
|
307
307
|
consider helping out by submitting a pull request if you find a rule that won't
|
@@ -366,5 +366,17 @@ this to your `.vimrc`:
|
|
366
366
|
let g:ale_fix_on_save = 1
|
367
367
|
```
|
368
368
|
|
369
|
+
## Contributing
|
370
|
+
|
371
|
+
Follow the steps below to setup standard locally:
|
372
|
+
|
373
|
+
```bash
|
374
|
+
$ git clone https://github.com/testdouble/standard
|
375
|
+
$ cd standard
|
376
|
+
$ gem install bundler # if working with ruby version below 2.6.0
|
377
|
+
$ bundle install
|
378
|
+
$ bundle exec rake # to run test suite
|
379
|
+
```
|
380
|
+
|
369
381
|
## Code of Conduct
|
370
382
|
This project follows Test Double's [code of conduct](https://testdouble.com/code-of-conduct) for all community interactions, including (but not limited to) one-on-one communications, public posts/comments, code reviews, pull requests, and GitHub issues. If violations occur, Test Double will take any action they deem appropriate for the infraction, up to and including blocking a user from the organization's repositories.
|
data/config/base.yml
CHANGED
@@ -1,20 +1,35 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
|
1
4
|
AllCops:
|
2
|
-
# Prevent RuboCop from exploding when it finds an older-than-2.
|
5
|
+
# Prevent RuboCop from exploding when it finds an older-than-2.3 .ruby-version
|
3
6
|
TargetRubyVersion: 2.5
|
4
7
|
DisabledByDefault: true
|
5
8
|
Exclude: []
|
6
9
|
|
7
10
|
Bundler/DuplicatedGem:
|
8
11
|
Enabled: true
|
12
|
+
Include:
|
13
|
+
- '**/*.gemfile'
|
14
|
+
- '**/Gemfile'
|
15
|
+
- '**/gems.rb'
|
9
16
|
|
10
17
|
Bundler/InsecureProtocolSource:
|
11
18
|
Enabled: true
|
19
|
+
Include:
|
20
|
+
- '**/*.gemfile'
|
21
|
+
- '**/Gemfile'
|
22
|
+
- '**/gems.rb'
|
12
23
|
|
13
24
|
Gemspec/DuplicatedAssignment:
|
14
25
|
Enabled: true
|
26
|
+
Include:
|
27
|
+
- '**/*.gemspec'
|
15
28
|
|
16
29
|
Layout/AccessModifierIndentation:
|
17
30
|
Enabled: true
|
31
|
+
EnforcedStyle: indent
|
32
|
+
IndentationWidth: ~
|
18
33
|
|
19
34
|
Layout/AlignArray:
|
20
35
|
Enabled: true
|
@@ -23,13 +38,16 @@ Layout/AlignHash:
|
|
23
38
|
Enabled: true
|
24
39
|
EnforcedHashRocketStyle: key
|
25
40
|
EnforcedColonStyle: key
|
41
|
+
EnforcedLastArgumentHashStyle: always_inspect
|
26
42
|
|
27
43
|
Layout/AlignParameters:
|
28
44
|
Enabled: true
|
29
45
|
EnforcedStyle: with_fixed_indentation
|
46
|
+
IndentationWidth: ~
|
30
47
|
|
31
48
|
Layout/BlockAlignment:
|
32
49
|
Enabled: true
|
50
|
+
EnforcedStyleAlignWith: either
|
33
51
|
|
34
52
|
Layout/BlockEndNewline:
|
35
53
|
Enabled: true
|
@@ -53,6 +71,9 @@ Layout/ConditionPosition:
|
|
53
71
|
|
54
72
|
Layout/DefEndAlignment:
|
55
73
|
Enabled: true
|
74
|
+
EnforcedStyleAlignWith: start_of_line
|
75
|
+
AutoCorrect: false
|
76
|
+
Severity: warning
|
56
77
|
|
57
78
|
Layout/DotPosition:
|
58
79
|
Enabled: true
|
@@ -63,12 +84,16 @@ Layout/ElseAlignment:
|
|
63
84
|
|
64
85
|
Layout/EmptyComment:
|
65
86
|
Enabled: true
|
87
|
+
AllowBorderComment: true
|
88
|
+
AllowMarginComment: true
|
66
89
|
|
67
90
|
Layout/EmptyLineAfterMagicComment:
|
68
91
|
Enabled: true
|
69
92
|
|
70
93
|
Layout/EmptyLineBetweenDefs:
|
71
94
|
Enabled: true
|
95
|
+
AllowAdjacentOneLineDefs: false
|
96
|
+
NumberOfEmptyLines: 1
|
72
97
|
|
73
98
|
Layout/EmptyLines:
|
74
99
|
Enabled: true
|
@@ -84,9 +109,11 @@ Layout/EmptyLinesAroundBeginBody:
|
|
84
109
|
|
85
110
|
Layout/EmptyLinesAroundBlockBody:
|
86
111
|
Enabled: true
|
112
|
+
EnforcedStyle: no_empty_lines
|
87
113
|
|
88
114
|
Layout/EmptyLinesAroundClassBody:
|
89
115
|
Enabled: true
|
116
|
+
EnforcedStyle: no_empty_lines
|
90
117
|
|
91
118
|
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
92
119
|
Enabled: true
|
@@ -96,41 +123,55 @@ Layout/EmptyLinesAroundMethodBody:
|
|
96
123
|
|
97
124
|
Layout/EmptyLinesAroundModuleBody:
|
98
125
|
Enabled: true
|
126
|
+
EnforcedStyle: no_empty_lines
|
99
127
|
|
100
128
|
Layout/EndAlignment:
|
101
129
|
Enabled: true
|
102
130
|
AutoCorrect: true
|
103
131
|
EnforcedStyleAlignWith: variable
|
132
|
+
Severity: warning
|
104
133
|
|
105
134
|
Layout/EndOfLine:
|
106
135
|
Enabled: true
|
136
|
+
EnforcedStyle: native
|
107
137
|
|
108
138
|
Layout/ExtraSpacing:
|
109
139
|
Enabled: true
|
140
|
+
AllowForAlignment: true
|
141
|
+
AllowBeforeTrailingComments: false
|
142
|
+
ForceEqualSignAlignment: false
|
110
143
|
|
111
|
-
Layout/
|
144
|
+
Layout/IndentFirstArgument:
|
112
145
|
Enabled: true
|
113
146
|
EnforcedStyle: consistent
|
147
|
+
IndentationWidth: ~
|
114
148
|
|
115
|
-
Layout/
|
149
|
+
Layout/IndentFirstArrayElement:
|
116
150
|
Enabled: true
|
117
151
|
EnforcedStyle: consistent
|
152
|
+
IndentationWidth: ~
|
118
153
|
|
119
154
|
Layout/IndentAssignment:
|
120
155
|
Enabled: true
|
156
|
+
IndentationWidth: ~
|
121
157
|
|
122
|
-
Layout/
|
158
|
+
Layout/IndentFirstHashElement:
|
123
159
|
Enabled: true
|
124
160
|
EnforcedStyle: consistent
|
161
|
+
IndentationWidth: ~
|
125
162
|
|
126
163
|
Layout/IndentHeredoc:
|
127
164
|
Enabled: true
|
165
|
+
EnforcedStyle: squiggly
|
128
166
|
|
129
167
|
Layout/IndentationConsistency:
|
130
168
|
Enabled: true
|
169
|
+
EnforcedStyle: normal
|
131
170
|
|
132
171
|
Layout/IndentationWidth:
|
133
172
|
Enabled: true
|
173
|
+
Width: 2
|
174
|
+
IgnoredPatterns: []
|
134
175
|
|
135
176
|
Layout/InitialIndentation:
|
136
177
|
Enabled: true
|
@@ -143,26 +184,32 @@ Layout/LeadingCommentSpace:
|
|
143
184
|
|
144
185
|
Layout/MultilineArrayBraceLayout:
|
145
186
|
Enabled: true
|
187
|
+
EnforcedStyle: symmetrical
|
146
188
|
|
147
189
|
Layout/MultilineBlockLayout:
|
148
190
|
Enabled: true
|
149
191
|
|
150
192
|
Layout/MultilineHashBraceLayout:
|
151
193
|
Enabled: true
|
194
|
+
EnforcedStyle: symmetrical
|
152
195
|
|
153
196
|
Layout/MultilineMethodCallBraceLayout:
|
154
197
|
Enabled: true
|
198
|
+
EnforcedStyle: symmetrical
|
155
199
|
|
156
200
|
Layout/MultilineMethodCallIndentation:
|
157
201
|
Enabled: true
|
158
202
|
EnforcedStyle: indented
|
203
|
+
IndentationWidth: ~
|
159
204
|
|
160
205
|
Layout/MultilineMethodDefinitionBraceLayout:
|
161
206
|
Enabled: true
|
207
|
+
EnforcedStyle: symmetrical
|
162
208
|
|
163
209
|
Layout/MultilineOperationIndentation:
|
164
210
|
Enabled: true
|
165
211
|
EnforcedStyle: indented
|
212
|
+
IndentationWidth: ~
|
166
213
|
|
167
214
|
Layout/RescueEnsureAlignment:
|
168
215
|
Enabled: true
|
@@ -184,18 +231,23 @@ Layout/SpaceAfterSemicolon:
|
|
184
231
|
|
185
232
|
Layout/SpaceAroundBlockParameters:
|
186
233
|
Enabled: true
|
234
|
+
EnforcedStyleInsidePipes: no_space
|
187
235
|
|
188
236
|
Layout/SpaceAroundEqualsInParameterDefault:
|
189
237
|
Enabled: true
|
238
|
+
EnforcedStyle: space
|
190
239
|
|
191
240
|
Layout/SpaceAroundKeyword:
|
192
241
|
Enabled: true
|
193
242
|
|
194
243
|
Layout/SpaceAroundOperators:
|
195
244
|
Enabled: true
|
245
|
+
AllowForAlignment: true
|
196
246
|
|
197
247
|
Layout/SpaceBeforeBlockBraces:
|
198
248
|
Enabled: true
|
249
|
+
EnforcedStyle: space
|
250
|
+
EnforcedStyleForEmptyBraces: space
|
199
251
|
|
200
252
|
Layout/SpaceBeforeComma:
|
201
253
|
Enabled: true
|
@@ -205,28 +257,37 @@ Layout/SpaceBeforeComment:
|
|
205
257
|
|
206
258
|
Layout/SpaceBeforeFirstArg:
|
207
259
|
Enabled: true
|
260
|
+
AllowForAlignment: true
|
208
261
|
|
209
262
|
Layout/SpaceBeforeSemicolon:
|
210
263
|
Enabled: true
|
211
264
|
|
212
265
|
Layout/SpaceInLambdaLiteral:
|
213
266
|
Enabled: true
|
267
|
+
EnforcedStyle: require_no_space
|
214
268
|
|
215
269
|
Layout/SpaceInsideArrayLiteralBrackets:
|
216
270
|
Enabled: true
|
271
|
+
EnforcedStyle: no_space
|
272
|
+
EnforcedStyleForEmptyBrackets: no_space
|
217
273
|
|
218
274
|
Layout/SpaceInsideArrayPercentLiteral:
|
219
275
|
Enabled: true
|
220
276
|
|
221
277
|
Layout/SpaceInsideBlockBraces:
|
222
278
|
Enabled: true
|
279
|
+
EnforcedStyle: space
|
280
|
+
EnforcedStyleForEmptyBraces: no_space
|
281
|
+
SpaceBeforeBlockParameters: true
|
223
282
|
|
224
283
|
Layout/SpaceInsideHashLiteralBraces:
|
225
284
|
Enabled: true
|
226
285
|
EnforcedStyle: no_space
|
286
|
+
EnforcedStyleForEmptyBraces: no_space
|
227
287
|
|
228
288
|
Layout/SpaceInsideParens:
|
229
289
|
Enabled: true
|
290
|
+
EnforcedStyle: no_space
|
230
291
|
|
231
292
|
Layout/SpaceInsidePercentLiteralDelimiters:
|
232
293
|
Enabled: true
|
@@ -236,18 +297,24 @@ Layout/SpaceInsideRangeLiteral:
|
|
236
297
|
|
237
298
|
Layout/SpaceInsideReferenceBrackets:
|
238
299
|
Enabled: true
|
300
|
+
EnforcedStyle: no_space
|
301
|
+
EnforcedStyleForEmptyBrackets: no_space
|
239
302
|
|
240
303
|
Layout/SpaceInsideStringInterpolation:
|
241
304
|
Enabled: true
|
305
|
+
EnforcedStyle: no_space
|
242
306
|
|
243
307
|
Layout/Tab:
|
244
308
|
Enabled: true
|
309
|
+
IndentationWidth: ~
|
245
310
|
|
246
311
|
Layout/TrailingBlankLines:
|
247
312
|
Enabled: true
|
313
|
+
EnforcedStyle: final_newline
|
248
314
|
|
249
315
|
Layout/TrailingWhitespace:
|
250
316
|
Enabled: true
|
317
|
+
AllowInHeredoc: false
|
251
318
|
|
252
319
|
Lint/AmbiguousBlockAssociation:
|
253
320
|
Enabled: true
|
@@ -260,6 +327,7 @@ Lint/AmbiguousRegexpLiteral:
|
|
260
327
|
|
261
328
|
Lint/AssignmentInCondition:
|
262
329
|
Enabled: true
|
330
|
+
AllowSafeAssignment: true
|
263
331
|
|
264
332
|
Lint/BigDecimalNew:
|
265
333
|
Enabled: true
|
@@ -293,6 +361,7 @@ Lint/ElseLayout:
|
|
293
361
|
|
294
362
|
Lint/EmptyEnsure:
|
295
363
|
Enabled: true
|
364
|
+
AutoCorrect: false
|
296
365
|
|
297
366
|
Lint/EmptyExpression:
|
298
367
|
Enabled: true
|
@@ -329,6 +398,7 @@ Lint/IneffectiveAccessModifier:
|
|
329
398
|
|
330
399
|
Lint/InheritException:
|
331
400
|
Enabled: true
|
401
|
+
EnforcedStyle: runtime_error
|
332
402
|
|
333
403
|
Lint/InterpolationCheck:
|
334
404
|
Enabled: true
|
@@ -344,6 +414,7 @@ Lint/Loop:
|
|
344
414
|
|
345
415
|
Lint/MissingCopEnableDirective:
|
346
416
|
Enabled: true
|
417
|
+
MaximumRangeSize: .inf
|
347
418
|
|
348
419
|
Lint/MultipleCompare:
|
349
420
|
Enabled: true
|
@@ -395,12 +466,25 @@ Lint/ReturnInVoidContext:
|
|
395
466
|
|
396
467
|
Lint/SafeNavigationChain:
|
397
468
|
Enabled: true
|
469
|
+
Whitelist:
|
470
|
+
- present?
|
471
|
+
- blank?
|
472
|
+
- presence
|
473
|
+
- try
|
474
|
+
- try!
|
398
475
|
|
399
476
|
Lint/SafeNavigationConsistency:
|
400
477
|
Enabled: true
|
478
|
+
Whitelist:
|
479
|
+
- present?
|
480
|
+
- blank?
|
481
|
+
- presence
|
482
|
+
- try
|
483
|
+
- try!
|
401
484
|
|
402
485
|
Lint/ShadowedArgument:
|
403
486
|
Enabled: true
|
487
|
+
IgnoreImplicitReferences: false
|
404
488
|
|
405
489
|
Lint/ShadowedException:
|
406
490
|
Enabled: true
|
@@ -446,6 +530,7 @@ Lint/UselessSetterCall:
|
|
446
530
|
|
447
531
|
Lint/Void:
|
448
532
|
Enabled: true
|
533
|
+
CheckForMethodsWithNoSideEffects: false
|
449
534
|
|
450
535
|
Naming/AccessorMethodName:
|
451
536
|
Enabled: true
|
@@ -464,15 +549,22 @@ Naming/ConstantName:
|
|
464
549
|
|
465
550
|
Naming/HeredocDelimiterCase:
|
466
551
|
Enabled: true
|
552
|
+
EnforcedStyle: uppercase
|
467
553
|
|
468
554
|
Naming/MethodName:
|
469
555
|
Enabled: true
|
556
|
+
EnforcedStyle: snake_case
|
470
557
|
|
471
558
|
Naming/UncommunicativeBlockParamName:
|
472
559
|
Enabled: true
|
560
|
+
MinNameLength: 1
|
561
|
+
AllowNamesEndingInNumbers: true
|
562
|
+
AllowedNames: []
|
563
|
+
ForbiddenNames: []
|
473
564
|
|
474
565
|
Naming/VariableName:
|
475
566
|
Enabled: true
|
567
|
+
EnforcedStyle: snake_case
|
476
568
|
|
477
569
|
Performance/Caller:
|
478
570
|
Enabled: true
|
@@ -482,33 +574,42 @@ Performance/CompareWithBlock:
|
|
482
574
|
|
483
575
|
Performance/Count:
|
484
576
|
Enabled: true
|
577
|
+
SafeMode: true
|
485
578
|
|
486
579
|
Performance/Detect:
|
487
580
|
Enabled: true
|
581
|
+
SafeMode: true
|
488
582
|
|
489
583
|
Performance/DoubleStartEndWith:
|
490
584
|
Enabled: true
|
585
|
+
IncludeActiveSupportAliases: false
|
491
586
|
|
492
587
|
Performance/EndWith:
|
493
588
|
Enabled: true
|
589
|
+
SafeAutoCorrect: false
|
590
|
+
AutoCorrect: false
|
494
591
|
|
495
592
|
Performance/FixedSize:
|
496
593
|
Enabled: true
|
497
594
|
|
498
595
|
Performance/FlatMap:
|
499
596
|
Enabled: true
|
597
|
+
EnabledForFlattenWithoutParams: false
|
500
598
|
|
501
599
|
Performance/InefficientHashSearch:
|
502
600
|
Enabled: true
|
601
|
+
Safe: false
|
503
602
|
|
504
603
|
Performance/RangeInclude:
|
505
604
|
Enabled: true
|
605
|
+
Safe: false
|
506
606
|
|
507
607
|
Performance/RedundantMatch:
|
508
608
|
Enabled: true
|
509
609
|
|
510
610
|
Performance/RedundantMerge:
|
511
611
|
Enabled: true
|
612
|
+
MaxKeyValuePairs: 2
|
512
613
|
|
513
614
|
Performance/RegexpMatch:
|
514
615
|
Enabled: true
|
@@ -521,6 +622,8 @@ Performance/Size:
|
|
521
622
|
|
522
623
|
Performance/StartWith:
|
523
624
|
Enabled: true
|
625
|
+
SafeAutoCorrect: false
|
626
|
+
AutoCorrect: false
|
524
627
|
|
525
628
|
Performance/StringReplacement:
|
526
629
|
Enabled: true
|
@@ -531,140 +634,21 @@ Performance/UnfreezeString:
|
|
531
634
|
Performance/UriDefaultParser:
|
532
635
|
Enabled: true
|
533
636
|
|
534
|
-
Rails/ActionFilter:
|
535
|
-
Enabled: true
|
536
|
-
|
537
|
-
Rails/ActiveRecordAliases:
|
538
|
-
Enabled: true
|
539
|
-
|
540
|
-
Rails/ActiveSupportAliases:
|
541
|
-
Enabled: true
|
542
|
-
|
543
|
-
Rails/ApplicationJob:
|
544
|
-
Enabled: true
|
545
|
-
|
546
|
-
Rails/ApplicationRecord:
|
547
|
-
Enabled: true
|
548
|
-
|
549
|
-
Rails/AssertNot:
|
550
|
-
Enabled: true
|
551
|
-
|
552
|
-
Rails/Blank:
|
553
|
-
Enabled: true
|
554
|
-
|
555
|
-
Rails/BulkChangeTable:
|
556
|
-
Enabled: true
|
557
|
-
|
558
|
-
Rails/CreateTableWithTimestamps:
|
559
|
-
Enabled: true
|
560
|
-
|
561
|
-
Rails/Date:
|
562
|
-
Enabled: true
|
563
|
-
|
564
|
-
Rails/Delegate:
|
565
|
-
Enabled: true
|
566
|
-
|
567
|
-
Rails/DelegateAllowBlank:
|
568
|
-
Enabled: true
|
569
|
-
|
570
|
-
Rails/DynamicFindBy:
|
571
|
-
Enabled: true
|
572
|
-
|
573
|
-
Rails/EnumUniqueness:
|
574
|
-
Enabled: true
|
575
|
-
|
576
|
-
Rails/EnvironmentComparison:
|
577
|
-
Enabled: true
|
578
|
-
|
579
|
-
Rails/Exit:
|
580
|
-
Enabled: true
|
581
|
-
|
582
|
-
Rails/FilePath:
|
583
|
-
Enabled: true
|
584
|
-
|
585
|
-
Rails/FindBy:
|
586
|
-
Enabled: true
|
587
|
-
|
588
|
-
Rails/FindEach:
|
589
|
-
Enabled: true
|
590
|
-
|
591
|
-
Rails/HasAndBelongsToMany:
|
592
|
-
Enabled: true
|
593
|
-
|
594
|
-
Rails/HttpPositionalArguments:
|
595
|
-
Enabled: true
|
596
|
-
|
597
|
-
Rails/HttpStatus:
|
598
|
-
Enabled: true
|
599
|
-
|
600
|
-
Rails/InverseOf:
|
601
|
-
Enabled: true
|
602
|
-
|
603
|
-
Rails/LexicallyScopedActionFilter:
|
604
|
-
Enabled: true
|
605
|
-
|
606
|
-
Rails/NotNullColumn:
|
607
|
-
Enabled: true
|
608
|
-
|
609
|
-
Rails/Output:
|
610
|
-
Enabled: true
|
611
|
-
|
612
|
-
Rails/OutputSafety:
|
613
|
-
Enabled: true
|
614
|
-
|
615
|
-
Rails/PluralizationGrammar:
|
616
|
-
Enabled: true
|
617
|
-
|
618
|
-
Rails/Presence:
|
619
|
-
Enabled: true
|
620
|
-
|
621
|
-
Rails/Present:
|
622
|
-
Enabled: true
|
623
|
-
|
624
|
-
Rails/ReadWriteAttribute:
|
625
|
-
Enabled: true
|
626
|
-
|
627
|
-
Rails/RedundantReceiverInWithOptions:
|
628
|
-
Enabled: true
|
629
|
-
|
630
|
-
Rails/RefuteMethods:
|
631
|
-
Enabled: true
|
632
|
-
|
633
|
-
Rails/RelativeDateConstant:
|
634
|
-
Enabled: true
|
635
|
-
|
636
|
-
Rails/RequestReferer:
|
637
|
-
Enabled: true
|
638
|
-
|
639
|
-
Rails/ReversibleMigration:
|
640
|
-
Enabled: true
|
641
|
-
|
642
|
-
Rails/SafeNavigation:
|
643
|
-
Enabled: true
|
644
|
-
|
645
|
-
Rails/ScopeArgs:
|
646
|
-
Enabled: true
|
647
|
-
|
648
|
-
Rails/TimeZone:
|
649
|
-
Enabled: true
|
650
|
-
|
651
|
-
Rails/UniqBeforePluck:
|
652
|
-
Enabled: true
|
653
|
-
|
654
|
-
Rails/Validation:
|
655
|
-
Enabled: true
|
656
|
-
|
657
637
|
Security/Eval:
|
658
638
|
Enabled: true
|
659
639
|
|
660
640
|
Security/JSONLoad:
|
661
641
|
Enabled: true
|
642
|
+
AutoCorrect: false
|
643
|
+
SafeAutoCorrect: false
|
662
644
|
|
663
645
|
Security/Open:
|
664
646
|
Enabled: true
|
647
|
+
Safe: false
|
665
648
|
|
666
649
|
Security/YAMLLoad:
|
667
650
|
Enabled: true
|
651
|
+
SafeAutoCorrect: false
|
668
652
|
|
669
653
|
|
670
654
|
Standard/SemanticBlocks:
|
@@ -701,9 +685,11 @@ Standard/SemanticBlocks:
|
|
701
685
|
|
702
686
|
Style/Alias:
|
703
687
|
Enabled: true
|
688
|
+
EnforcedStyle: prefer_alias
|
704
689
|
|
705
690
|
Style/AndOr:
|
706
691
|
Enabled: true
|
692
|
+
EnforcedStyle: always
|
707
693
|
|
708
694
|
Style/ArrayJoin:
|
709
695
|
Enabled: true
|
@@ -713,6 +699,7 @@ Style/Attr:
|
|
713
699
|
|
714
700
|
Style/BarePercentLiterals:
|
715
701
|
Enabled: true
|
702
|
+
EnforcedStyle: bare_percent
|
716
703
|
|
717
704
|
Style/BeginBlock:
|
718
705
|
Enabled: true
|
@@ -725,6 +712,7 @@ Style/CharacterLiteral:
|
|
725
712
|
|
726
713
|
Style/ClassCheck:
|
727
714
|
Enabled: true
|
715
|
+
EnforcedStyle: is_a?
|
728
716
|
|
729
717
|
Style/ClassMethods:
|
730
718
|
Enabled: true
|
@@ -738,12 +726,16 @@ Style/ColonMethodDefinition:
|
|
738
726
|
Style/CommandLiteral:
|
739
727
|
Enabled: true
|
740
728
|
EnforcedStyle: mixed
|
729
|
+
AllowInnerBackticks: false
|
741
730
|
|
742
731
|
Style/CommentedKeyword:
|
743
732
|
Enabled: true
|
744
733
|
|
745
734
|
Style/ConditionalAssignment:
|
746
735
|
Enabled: true
|
736
|
+
EnforcedStyle: assign_to_condition
|
737
|
+
SingleLineConditionsOnly: true
|
738
|
+
IncludeTernaryExpressions: true
|
747
739
|
|
748
740
|
Style/DefWithParentheses:
|
749
741
|
Enabled: true
|
@@ -765,6 +757,7 @@ Style/EmptyCaseCondition:
|
|
765
757
|
|
766
758
|
Style/EmptyElse:
|
767
759
|
Enabled: true
|
760
|
+
EnforcedStyle: both
|
768
761
|
|
769
762
|
Style/EmptyLambdaParameter:
|
770
763
|
Enabled: true
|
@@ -787,9 +780,11 @@ Style/EvalWithLocation:
|
|
787
780
|
|
788
781
|
Style/For:
|
789
782
|
Enabled: true
|
783
|
+
EnforcedStyle: each
|
790
784
|
|
791
785
|
Style/GlobalVars:
|
792
786
|
Enabled: true
|
787
|
+
AllowedVariables: []
|
793
788
|
|
794
789
|
Style/HashSyntax:
|
795
790
|
Enabled: true
|
@@ -809,15 +804,19 @@ Style/IfWithSemicolon:
|
|
809
804
|
|
810
805
|
Style/InfiniteLoop:
|
811
806
|
Enabled: true
|
807
|
+
SafeAutoCorrect: true
|
812
808
|
|
813
809
|
Style/LambdaCall:
|
814
810
|
Enabled: true
|
811
|
+
EnforcedStyle: call
|
815
812
|
|
816
813
|
Style/LineEndConcatenation:
|
817
814
|
Enabled: true
|
815
|
+
SafeAutoCorrect: false
|
818
816
|
|
819
817
|
Style/MethodCallWithoutArgsParentheses:
|
820
818
|
Enabled: true
|
819
|
+
IgnoredMethods: []
|
821
820
|
|
822
821
|
Style/MethodMissingSuper:
|
823
822
|
Enabled: true
|
@@ -827,6 +826,7 @@ Style/MissingRespondToMissing:
|
|
827
826
|
|
828
827
|
Style/MixinGrouping:
|
829
828
|
Enabled: true
|
829
|
+
EnforcedStyle: separated
|
830
830
|
|
831
831
|
Style/MixinUsage:
|
832
832
|
Enabled: true
|
@@ -839,9 +839,11 @@ Style/MultilineIfThen:
|
|
839
839
|
|
840
840
|
Style/MultilineMemoization:
|
841
841
|
Enabled: true
|
842
|
+
EnforcedStyle: keyword
|
842
843
|
|
843
844
|
Style/NegatedIf:
|
844
845
|
Enabled: true
|
846
|
+
EnforcedStyle: both
|
845
847
|
|
846
848
|
Style/NegatedWhile:
|
847
849
|
Enabled: true
|
@@ -851,21 +853,42 @@ Style/NestedModifier:
|
|
851
853
|
|
852
854
|
Style/NestedParenthesizedCalls:
|
853
855
|
Enabled: true
|
856
|
+
Whitelist:
|
857
|
+
- be
|
858
|
+
- be_a
|
859
|
+
- be_an
|
860
|
+
- be_between
|
861
|
+
- be_falsey
|
862
|
+
- be_kind_of
|
863
|
+
- be_instance_of
|
864
|
+
- be_truthy
|
865
|
+
- be_within
|
866
|
+
- eq
|
867
|
+
- eql
|
868
|
+
- end_with
|
869
|
+
- include
|
870
|
+
- match
|
871
|
+
- raise_error
|
872
|
+
- respond_to
|
873
|
+
- start_with
|
854
874
|
|
855
875
|
Style/NestedTernaryOperator:
|
856
876
|
Enabled: true
|
857
877
|
|
858
878
|
Style/NilComparison:
|
859
879
|
Enabled: true
|
880
|
+
EnforcedStyle: predicate
|
860
881
|
|
861
882
|
Style/NonNilCheck:
|
862
883
|
Enabled: true
|
884
|
+
IncludeSemanticChanges: false
|
863
885
|
|
864
886
|
Style/Not:
|
865
887
|
Enabled: true
|
866
888
|
|
867
889
|
Style/NumericLiteralPrefix:
|
868
890
|
Enabled: true
|
891
|
+
EnforcedOctalStyle: zero_with_o
|
869
892
|
|
870
893
|
Style/OneLineConditional:
|
871
894
|
Enabled: true
|
@@ -878,15 +901,26 @@ Style/OrAssignment:
|
|
878
901
|
|
879
902
|
Style/ParenthesesAroundCondition:
|
880
903
|
Enabled: true
|
904
|
+
AllowSafeAssignment: true
|
905
|
+
AllowInMultilineConditions: false
|
881
906
|
|
882
907
|
Style/PercentLiteralDelimiters:
|
883
908
|
Enabled: true
|
909
|
+
PreferredDelimiters:
|
910
|
+
default: ()
|
911
|
+
'%i': '[]'
|
912
|
+
'%I': '[]'
|
913
|
+
'%r': '{}'
|
914
|
+
'%w': '[]'
|
915
|
+
'%W': '[]'
|
884
916
|
|
885
917
|
Style/PercentQLiterals:
|
886
918
|
Enabled: true
|
919
|
+
EnforcedStyle: lower_case_q
|
887
920
|
|
888
921
|
Style/PreferredHashMethods:
|
889
922
|
Enabled: true
|
923
|
+
EnforcedStyle: short
|
890
924
|
|
891
925
|
Style/Proc:
|
892
926
|
Enabled: true
|
@@ -911,6 +945,7 @@ Style/RedundantParentheses:
|
|
911
945
|
|
912
946
|
Style/RedundantReturn:
|
913
947
|
Enabled: true
|
948
|
+
AllowMultipleReturnValues: false
|
914
949
|
|
915
950
|
Style/RedundantSelf:
|
916
951
|
Enabled: true
|
@@ -927,6 +962,13 @@ Style/RescueStandardError:
|
|
927
962
|
|
928
963
|
Style/SafeNavigation:
|
929
964
|
Enabled: true
|
965
|
+
ConvertCodeThatCanStartToReturnNil: false
|
966
|
+
Whitelist:
|
967
|
+
- present?
|
968
|
+
- blank?
|
969
|
+
- presence
|
970
|
+
- try
|
971
|
+
- try!
|
930
972
|
|
931
973
|
Style/Sample:
|
932
974
|
Enabled: true
|
@@ -936,12 +978,15 @@ Style/SelfAssignment:
|
|
936
978
|
|
937
979
|
Style/Semicolon:
|
938
980
|
Enabled: true
|
981
|
+
AllowAsExpressionSeparator: false
|
939
982
|
|
940
983
|
Style/SingleLineMethods:
|
941
984
|
Enabled: true
|
985
|
+
AllowIfMethodIsEmpty: false
|
942
986
|
|
943
987
|
Style/StabbyLambdaParentheses:
|
944
988
|
Enabled: true
|
989
|
+
EnforcedStyle: require_parentheses
|
945
990
|
|
946
991
|
Style/StderrPuts:
|
947
992
|
Enabled: true
|
@@ -949,6 +994,7 @@ Style/StderrPuts:
|
|
949
994
|
Style/StringLiterals:
|
950
995
|
Enabled: true
|
951
996
|
EnforcedStyle: double_quotes
|
997
|
+
ConsistentQuotesInMultiline: false
|
952
998
|
|
953
999
|
Style/StringLiteralsInInterpolation:
|
954
1000
|
Enabled: true
|
@@ -962,6 +1008,8 @@ Style/SymbolLiteral:
|
|
962
1008
|
|
963
1009
|
Style/TernaryParentheses:
|
964
1010
|
Enabled: true
|
1011
|
+
EnforcedStyle: require_no_parentheses
|
1012
|
+
AllowSafeAssignment: true
|
965
1013
|
|
966
1014
|
Style/TrailingBodyOnClass:
|
967
1015
|
Enabled: true
|
@@ -985,6 +1033,28 @@ Style/TrailingMethodEndStatement:
|
|
985
1033
|
|
986
1034
|
Style/TrivialAccessors:
|
987
1035
|
Enabled: true
|
1036
|
+
ExactNameMatch: true
|
1037
|
+
AllowPredicates: true
|
1038
|
+
AllowDSLWriters: false
|
1039
|
+
IgnoreClassMethods: false
|
1040
|
+
Whitelist:
|
1041
|
+
- to_ary
|
1042
|
+
- to_a
|
1043
|
+
- to_c
|
1044
|
+
- to_enum
|
1045
|
+
- to_h
|
1046
|
+
- to_hash
|
1047
|
+
- to_i
|
1048
|
+
- to_int
|
1049
|
+
- to_io
|
1050
|
+
- to_open
|
1051
|
+
- to_path
|
1052
|
+
- to_proc
|
1053
|
+
- to_r
|
1054
|
+
- to_regexp
|
1055
|
+
- to_str
|
1056
|
+
- to_s
|
1057
|
+
- to_sym
|
988
1058
|
|
989
1059
|
Style/UnlessElse:
|
990
1060
|
Enabled: true
|
@@ -1018,3 +1088,4 @@ Style/WhileUntilDo:
|
|
1018
1088
|
|
1019
1089
|
Style/YodaCondition:
|
1020
1090
|
Enabled: true
|
1091
|
+
EnforcedStyle: forbid_for_all_comparison_operators
|
data/config/ruby-2.2.yml
CHANGED
@@ -9,7 +9,7 @@ class Standard::CreatesConfigStore
|
|
9
9
|
private
|
10
10
|
|
11
11
|
def max_rubocop_supported_version(desired_version)
|
12
|
-
rubocop_supported_version = Gem::Version.new("2.
|
12
|
+
rubocop_supported_version = Gem::Version.new("2.3")
|
13
13
|
if desired_version < rubocop_supported_version
|
14
14
|
rubocop_supported_version
|
15
15
|
else
|
data/lib/standard/version.rb
CHANGED
data/standard.gemspec
CHANGED
@@ -18,7 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "rubocop", "~> 0.
|
21
|
+
spec.add_dependency "rubocop", "~> 0.72.0"
|
22
|
+
spec.add_dependency "rubocop-performance", "~> 1.4.0"
|
22
23
|
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.17"
|
24
25
|
spec.add_development_dependency "minitest", "~> 5.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.72.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.72.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-performance
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.4.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.4.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|