rubocop-standard 4.2.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{LICENSE → LICENSE.txt} +0 -0
- data/README.md +8 -8
- data/config/default.yml +13 -311
- data/config/rails.yml +0 -108
- metadata +19 -45
- data/STYLEGUIDE.md +0 -763
- data/guides/rails-controller-render-shorthand.md +0 -9
- data/guides/rails-render-inline.md +0 -27
- data/guides/rails-render-literal.md +0 -8
- data/lib/rubocop/cop/standard/rails.rb +0 -10
- data/lib/rubocop/cop/standard/rails/rails_application_record.rb +0 -27
- data/lib/rubocop/cop/standard/rails/rails_controller_render_action_symbol.rb +0 -43
- data/lib/rubocop/cop/standard/rails/rails_controller_render_paths_exist.rb +0 -63
- data/lib/rubocop/cop/standard/rails/rails_controller_render_shorthand.rb +0 -51
- data/lib/rubocop/cop/standard/rails/rails_render_inline.rb +0 -27
- data/lib/rubocop/cop/standard/rails/rails_render_object_collection.rb +0 -45
- data/lib/rubocop/cop/standard/rails/rails_view_render_paths_exist.rb +0 -55
- data/lib/rubocop/cop/standard/rails/rails_view_render_shorthand.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af2cad15d0c1857d73db907a4b7709ce843cc5080230a54a41c8d1afe5581a45
|
4
|
+
data.tar.gz: 1d22ed630333033f27ecdb0a12f04d2e8ebdf1e61de193ffb20f6587e4cc3d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7a47564b86bae3a585afa0fed234a2ad734781eff4c63b68a5aebb76097d4cc7167a315115b36cc1635211593959b41b1e3365e0b948deb7dbfe3b71915b858
|
7
|
+
data.tar.gz: 9609d8d2c05a1b1302742392d3c0aaf701c48291531f7b11fcec7da78464eadc0e9a895a29d14c91ca23b637ea71614b340edfd8b0652f0a15a73da4bf397c6b
|
data/{LICENSE → LICENSE.txt}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
# RuboCop Standard
|
1
|
+
# RuboCop Standard
|
2
2
|
|
3
|
-
This repository
|
3
|
+
This repository enables all the recommended RuboCop configurations, but disables the overly aggressive ones.
|
4
|
+
|
5
|
+
## What's "overly aggressive"?
|
6
|
+
|
7
|
+
You know, all the ones about line length, method complexity, requiring documentation, etc.
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
7
|
-
|
11
|
+
### Gemfile
|
8
12
|
|
9
13
|
``` ruby
|
10
14
|
gem "rubocop-standard"
|
11
15
|
```
|
12
16
|
|
13
|
-
|
17
|
+
### .rubocop.yml
|
14
18
|
|
15
19
|
``` yaml
|
16
20
|
require:
|
17
21
|
- rubocop-standard
|
18
22
|
```
|
19
|
-
|
20
|
-
## The Cops
|
21
|
-
|
22
|
-
All cops are located under [`lib/rubocop/cop/standard`](lib/rubocop/cop/standard), and contain examples/documentation.
|
data/config/default.yml
CHANGED
@@ -1,187 +1,20 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-performance
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
Enabled: true
|
15
|
-
|
16
|
-
Layout/ConditionPosition:
|
17
|
-
Enabled: true
|
18
|
-
|
19
|
-
Layout/DefEndAlignment:
|
20
|
-
Enabled: true
|
21
|
-
|
22
|
-
Layout/EmptyLinesAroundAttributeAccessor:
|
23
|
-
Enabled: true
|
24
|
-
|
25
|
-
Layout/EndAlignment:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Layout/EndOfLine:
|
29
|
-
Enabled: true
|
30
|
-
|
31
|
-
Layout/IndentationStyle:
|
32
|
-
Enabled: true
|
33
|
-
|
34
|
-
Layout/InitialIndentation:
|
35
|
-
Enabled: true
|
3
|
+
- rubocop-rake
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
NewCops: enable
|
7
|
+
Exclude:
|
8
|
+
- bin/**/*
|
9
|
+
- db/schema.rb
|
10
|
+
- db/migrate/*.rb
|
11
|
+
- node_modules/**/*
|
12
|
+
- tmp/**/*
|
13
|
+
- vendor/**/*
|
36
14
|
|
37
15
|
Layout/LineLength:
|
38
16
|
Enabled: false
|
39
17
|
|
40
|
-
Layout/SpaceAfterColon:
|
41
|
-
Enabled: true
|
42
|
-
|
43
|
-
Layout/SpaceAfterComma:
|
44
|
-
Enabled: true
|
45
|
-
|
46
|
-
Layout/SpaceAfterMethodName:
|
47
|
-
Enabled: true
|
48
|
-
|
49
|
-
Layout/SpaceAfterNot:
|
50
|
-
Enabled: true
|
51
|
-
|
52
|
-
Layout/SpaceAfterSemicolon:
|
53
|
-
Enabled: true
|
54
|
-
|
55
|
-
Layout/SpaceAroundBlockParameters:
|
56
|
-
Enabled: true
|
57
|
-
|
58
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
59
|
-
Enabled: true
|
60
|
-
|
61
|
-
Layout/SpaceAroundMethodCallOperator:
|
62
|
-
Enabled: true
|
63
|
-
|
64
|
-
Layout/SpaceBeforeBlockBraces:
|
65
|
-
Enabled: true
|
66
|
-
|
67
|
-
Layout/SpaceInsideArrayLiteralBrackets:
|
68
|
-
Enabled: true
|
69
|
-
EnforcedStyle: no_space
|
70
|
-
|
71
|
-
Layout/SpaceInsideArrayPercentLiteral:
|
72
|
-
Enabled: true
|
73
|
-
|
74
|
-
Layout/SpaceInsideBlockBraces:
|
75
|
-
Enabled: true
|
76
|
-
|
77
|
-
Layout/SpaceInsideParens:
|
78
|
-
Enabled: true
|
79
|
-
|
80
|
-
Layout/SpaceInsideRangeLiteral:
|
81
|
-
Enabled: true
|
82
|
-
|
83
|
-
Layout/SpaceInsideReferenceBrackets:
|
84
|
-
Enabled: true
|
85
|
-
|
86
|
-
Layout/TrailingEmptyLines:
|
87
|
-
Enabled: true
|
88
|
-
|
89
|
-
Layout/TrailingWhitespace:
|
90
|
-
Enabled: true
|
91
|
-
|
92
|
-
Lint/CircularArgumentReference:
|
93
|
-
Enabled: true
|
94
|
-
|
95
|
-
Lint/Debugger:
|
96
|
-
Enabled: true
|
97
|
-
|
98
|
-
Lint/DeprecatedClassMethods:
|
99
|
-
Enabled: true
|
100
|
-
|
101
|
-
Lint/DeprecatedOpenSSLConstant:
|
102
|
-
Enabled: true
|
103
|
-
|
104
|
-
Lint/DuplicateHashKey:
|
105
|
-
Enabled: true
|
106
|
-
|
107
|
-
Lint/DuplicateMethods:
|
108
|
-
Enabled: true
|
109
|
-
|
110
|
-
Lint/EachWithObjectArgument:
|
111
|
-
Enabled: true
|
112
|
-
|
113
|
-
Lint/ElseLayout:
|
114
|
-
Enabled: true
|
115
|
-
|
116
|
-
Lint/EmptyEnsure:
|
117
|
-
Enabled: true
|
118
|
-
|
119
|
-
Lint/EmptyInterpolation:
|
120
|
-
Enabled: true
|
121
|
-
|
122
|
-
Lint/EnsureReturn:
|
123
|
-
Enabled: true
|
124
|
-
|
125
|
-
Lint/FlipFlop:
|
126
|
-
Enabled: true
|
127
|
-
|
128
|
-
Lint/FloatOutOfRange:
|
129
|
-
Enabled: true
|
130
|
-
|
131
|
-
Lint/FormatParameterMismatch:
|
132
|
-
Enabled: true
|
133
|
-
|
134
|
-
Lint/LiteralAsCondition:
|
135
|
-
Enabled: true
|
136
|
-
|
137
|
-
Lint/LiteralInInterpolation:
|
138
|
-
Enabled: true
|
139
|
-
|
140
|
-
Lint/Loop:
|
141
|
-
Enabled: true
|
142
|
-
|
143
|
-
Lint/NextWithoutAccumulator:
|
144
|
-
Enabled: true
|
145
|
-
|
146
|
-
Lint/RandOne:
|
147
|
-
Enabled: true
|
148
|
-
|
149
|
-
Lint/RaiseException:
|
150
|
-
Enabled: true
|
151
|
-
|
152
|
-
Lint/RedundantStringCoercion:
|
153
|
-
Enabled: true
|
154
|
-
|
155
|
-
Lint/RequireParentheses:
|
156
|
-
Enabled: true
|
157
|
-
|
158
|
-
Lint/RescueException:
|
159
|
-
Enabled: true
|
160
|
-
|
161
|
-
Lint/StructNewOverride:
|
162
|
-
Enabled: true
|
163
|
-
|
164
|
-
Lint/UnderscorePrefixedVariableName:
|
165
|
-
Enabled: true
|
166
|
-
|
167
|
-
Lint/RedundantCopDisableDirective:
|
168
|
-
Enabled: true
|
169
|
-
|
170
|
-
Lint/RedundantSplatExpansion:
|
171
|
-
Enabled: true
|
172
|
-
|
173
|
-
Lint/UnreachableCode:
|
174
|
-
Enabled: true
|
175
|
-
|
176
|
-
Lint/UselessComparison:
|
177
|
-
Enabled: true
|
178
|
-
|
179
|
-
Lint/UselessSetterCall:
|
180
|
-
Enabled: true
|
181
|
-
|
182
|
-
Lint/Void:
|
183
|
-
Enabled: true
|
184
|
-
|
185
18
|
Metrics/AbcSize:
|
186
19
|
Enabled: false
|
187
20
|
|
@@ -209,149 +42,18 @@ Metrics/ParameterLists:
|
|
209
42
|
Metrics/PerceivedComplexity:
|
210
43
|
Enabled: false
|
211
44
|
|
212
|
-
|
213
|
-
Enabled: true
|
214
|
-
|
215
|
-
Naming/ClassAndModuleCamelCase:
|
216
|
-
Enabled: true
|
217
|
-
|
218
|
-
Naming/FileName:
|
219
|
-
Enabled: true
|
220
|
-
|
221
|
-
Naming/MethodName:
|
222
|
-
Enabled: true
|
223
|
-
|
224
|
-
Performance/CaseWhenSplat:
|
45
|
+
Rake/Desc:
|
225
46
|
Enabled: false
|
226
47
|
|
227
|
-
|
228
|
-
Enabled: true
|
229
|
-
|
230
|
-
Performance/Detect:
|
231
|
-
Enabled: true
|
232
|
-
|
233
|
-
Performance/DoubleStartEndWith:
|
234
|
-
Enabled: true
|
235
|
-
|
236
|
-
Performance/EndWith:
|
237
|
-
Enabled: true
|
238
|
-
|
239
|
-
Performance/FlatMap:
|
240
|
-
Enabled: true
|
241
|
-
|
242
|
-
Performance/RangeInclude:
|
243
|
-
Enabled: false
|
244
|
-
|
245
|
-
Performance/RedundantMatch:
|
48
|
+
Style/ClassAndModuleChildren:
|
246
49
|
Enabled: false
|
247
50
|
|
248
|
-
Performance/RedundantMerge:
|
249
|
-
Enabled: true
|
250
|
-
MaxKeyValuePairs: 1
|
251
|
-
|
252
|
-
Performance/ReverseEach:
|
253
|
-
Enabled: true
|
254
|
-
|
255
|
-
Performance/Size:
|
256
|
-
Enabled: true
|
257
|
-
|
258
|
-
Performance/StartWith:
|
259
|
-
Enabled: true
|
260
|
-
|
261
|
-
Security/Eval:
|
262
|
-
Enabled: true
|
263
|
-
|
264
51
|
Style/AccessModifierDeclarations:
|
265
52
|
Enabled: false
|
266
53
|
|
267
|
-
Style/ArrayJoin:
|
268
|
-
Enabled: true
|
269
|
-
|
270
|
-
Style/BeginBlock:
|
271
|
-
Enabled: true
|
272
|
-
|
273
|
-
Style/BlockComments:
|
274
|
-
Enabled: true
|
275
|
-
|
276
|
-
Style/CaseEquality:
|
277
|
-
Enabled: true
|
278
|
-
|
279
|
-
Style/CharacterLiteral:
|
280
|
-
Enabled: true
|
281
|
-
|
282
|
-
Style/ClassMethods:
|
283
|
-
Enabled: true
|
284
|
-
|
285
|
-
Style/Copyright:
|
286
|
-
Enabled: false
|
287
|
-
|
288
|
-
Style/DefWithParentheses:
|
289
|
-
Enabled: true
|
290
|
-
|
291
54
|
Style/Documentation:
|
292
55
|
Enabled: false
|
293
56
|
|
294
|
-
Style/EndBlock:
|
295
|
-
Enabled: true
|
296
|
-
|
297
|
-
Style/ExponentialNotation:
|
298
|
-
Enabled: true
|
299
|
-
|
300
|
-
Style/For:
|
301
|
-
Enabled: true
|
302
|
-
|
303
|
-
Style/FrozenStringLiteralComment:
|
304
|
-
Enabled: true
|
305
|
-
|
306
|
-
Style/HashEachMethods:
|
307
|
-
Enabled: true
|
308
|
-
|
309
|
-
Style/HashSyntax:
|
310
|
-
Enabled: true
|
311
|
-
EnforcedStyle: ruby19_no_mixed_keys
|
312
|
-
|
313
|
-
Style/HashTransformKeys:
|
314
|
-
Enabled: true
|
315
|
-
|
316
|
-
Style/HashTransformValues:
|
317
|
-
Enabled: true
|
318
|
-
|
319
|
-
Style/LambdaCall:
|
320
|
-
Enabled: true
|
321
|
-
|
322
|
-
Style/MethodCallWithoutArgsParentheses:
|
323
|
-
Enabled: true
|
324
|
-
|
325
|
-
Style/MethodDefParentheses:
|
326
|
-
Enabled: true
|
327
|
-
|
328
|
-
Style/MultilineIfThen:
|
329
|
-
Enabled: true
|
330
|
-
|
331
|
-
Style/NilComparison:
|
332
|
-
Enabled: true
|
333
|
-
|
334
|
-
Style/Not:
|
335
|
-
Enabled: true
|
336
|
-
|
337
|
-
Style/OneLineConditional:
|
338
|
-
Enabled: true
|
339
|
-
|
340
|
-
Style/RedundantSortBy:
|
341
|
-
Enabled: true
|
342
|
-
|
343
|
-
Style/Sample:
|
344
|
-
Enabled: true
|
345
|
-
|
346
|
-
Style/SlicingWithRange:
|
347
|
-
Enabled: true
|
348
|
-
|
349
|
-
Style/StabbyLambdaParentheses:
|
350
|
-
Enabled: true
|
351
|
-
|
352
57
|
Style/StringLiterals:
|
353
58
|
Enabled: true
|
354
59
|
EnforcedStyle: single_quotes
|
355
|
-
|
356
|
-
Style/Strip:
|
357
|
-
Enabled: true
|
data/config/rails.yml
CHANGED
@@ -1,110 +1,2 @@
|
|
1
1
|
require:
|
2
2
|
- rubocop-rails
|
3
|
-
- rubocop/cop/standard/rails
|
4
|
-
|
5
|
-
Rails/OutputSafety:
|
6
|
-
Enabled: true
|
7
|
-
|
8
|
-
Rails/PluralizationGrammar:
|
9
|
-
Enabled: true
|
10
|
-
|
11
|
-
Rails/RequestReferer:
|
12
|
-
Enabled: true
|
13
|
-
EnforcedStyle: referrer
|
14
|
-
|
15
|
-
Rails/ScopeArgs:
|
16
|
-
Enabled: true
|
17
|
-
|
18
|
-
Rails/UniqBeforePluck:
|
19
|
-
Enabled: true
|
20
|
-
|
21
|
-
Standard/RailsApplicationRecord:
|
22
|
-
Enabled: true
|
23
|
-
|
24
|
-
Standard/RailsControllerRenderActionSymbol:
|
25
|
-
Enabled: true
|
26
|
-
Include:
|
27
|
-
- "app/controllers/**/*.rb"
|
28
|
-
|
29
|
-
Standard/RailsControllerRenderPathsExist:
|
30
|
-
Enabled: true
|
31
|
-
ViewPath:
|
32
|
-
- "app/views"
|
33
|
-
Include:
|
34
|
-
- "app/controllers/**/*.rb"
|
35
|
-
|
36
|
-
Standard/RailsControllerRenderShorthand:
|
37
|
-
Enabled: true
|
38
|
-
StyleGuide: https://Standard.com/Standard/rubocop-Standard/blob/master/guides/rails-controller-render-shorthand.md
|
39
|
-
Include:
|
40
|
-
- "app/controllers/**/*.rb"
|
41
|
-
|
42
|
-
Standard/RailsRenderInline:
|
43
|
-
Enabled: true
|
44
|
-
StyleGuide: https://Standard.com/Standard/rubocop-Standard/blob/master/guides/rails-controller-render-inline.md
|
45
|
-
Include:
|
46
|
-
- "app/controllers/**/*.rb"
|
47
|
-
- "app/helpers/**/*.rb"
|
48
|
-
- "app/view_models/**/*.rb"
|
49
|
-
- "app/views/**/*.erb"
|
50
|
-
|
51
|
-
Standard/RailsRenderObjectCollection:
|
52
|
-
Enabled: false
|
53
|
-
|
54
|
-
Standard/RailsViewRenderPathsExist:
|
55
|
-
Enabled: true
|
56
|
-
ViewPath:
|
57
|
-
- "app/views"
|
58
|
-
Include:
|
59
|
-
- "app/helpers/**/*.rb"
|
60
|
-
- "app/view_models/**/*.rb"
|
61
|
-
- "app/views/**/*.erb"
|
62
|
-
|
63
|
-
Standard/RailsViewRenderShorthand:
|
64
|
-
Enabled: true
|
65
|
-
Include:
|
66
|
-
- "app/helpers/**/*.rb"
|
67
|
-
- "app/view_models/**/*.rb"
|
68
|
-
- "app/views/**/*.erb"
|
69
|
-
|
70
|
-
# Exclude Rails ERB files from incompatible cops
|
71
|
-
|
72
|
-
Layout/BlockAlignment:
|
73
|
-
Exclude:
|
74
|
-
- "app/views/**/*.erb"
|
75
|
-
|
76
|
-
Style/For:
|
77
|
-
Exclude:
|
78
|
-
- "app/views/**/*.erb"
|
79
|
-
|
80
|
-
Style/OneLineConditional:
|
81
|
-
Exclude:
|
82
|
-
- "app/views/**/*.erb"
|
83
|
-
|
84
|
-
Style/Semicolon:
|
85
|
-
Exclude:
|
86
|
-
- "app/views/**/*.erb"
|
87
|
-
|
88
|
-
Layout/SpaceInsideParens:
|
89
|
-
Exclude:
|
90
|
-
- "app/views/**/*.erb"
|
91
|
-
|
92
|
-
Style/StringLiterals:
|
93
|
-
Exclude:
|
94
|
-
- "app/views/**/*.erb"
|
95
|
-
|
96
|
-
Layout/TrailingEmptyLines:
|
97
|
-
Exclude:
|
98
|
-
- "app/views/**/*.erb"
|
99
|
-
|
100
|
-
Layout/TrailingWhitespace:
|
101
|
-
Exclude:
|
102
|
-
- "app/views/**/*.erb"
|
103
|
-
|
104
|
-
Layout/InitialIndentation:
|
105
|
-
Exclude:
|
106
|
-
- "app/views/**/*.erb"
|
107
|
-
|
108
|
-
Lint/UselessAccessModifier:
|
109
|
-
ContextCreatingMethods:
|
110
|
-
- concerning
|