simplycop 1.4.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88f566a01241a5651bbeee6ab969274e2aaddc7ae5d202a5178e69ddfb777442
4
- data.tar.gz: 6d0ae21a2f04e4a78e3abb43ae04fca74109fb84732a67d918d5c511e2465f78
3
+ metadata.gz: 076036bcf8a50fab9721ef1a9bc81c58c1b37be20b72b6882fbbcd55505f7071
4
+ data.tar.gz: f246b21e0afd394b49dbafd4445c90734f6232488d7d1578a4e3b118dff9ef53
5
5
  SHA512:
6
- metadata.gz: a0c1d3b1ab76fedf742d219b0b8c8c19380634ae2e5b0886ffbe41709e0b6a64184e4f87efae1c20fafacfe3b5b2916574b1bcddca7d47ca7c206093ffa2f5f0
7
- data.tar.gz: b64adedc727cfa74c539e8e221016764e89f8ea158fbfa910be89acc4d5fc39d70091e54ac4724612d4018e74a6f52fc2678927876e901e3430696405aa29f03
6
+ metadata.gz: a19db9f0d33d7b4a376c3e54d3d08f58dad4c891f1349f5c4edb26e04e16b8b21aadf766fcaaef28d16fb113959d755676fa4e5b3fa7d04dc631b99cfffcb02c
7
+ data.tar.gz: 723b0bb560e8fb0a229b131abba0ee984bb84f6aeb21500fa3dc9d7d25157a0d457f430ada57a8c3737d24218e95e3873efc317a0140da62624aac2cc295fa6f
@@ -21,438 +21,392 @@ AllCops:
21
21
  ExtraDetails: true
22
22
  # Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown
23
23
 
24
- Naming/VariableName:
24
+ Layout/EmptyLineAfterMultilineCondition:
25
25
  Enabled: true
26
- EnforcedStyle: snake_case
27
- SupportedStyles:
28
- - snake_case
29
- - camelCase
30
26
 
31
- Naming/FileName:
27
+ Layout/FirstArrayElementLineBreak:
32
28
  Enabled: true
33
29
 
34
- Layout/TrailingEmptyLines:
30
+ Layout/FirstMethodArgumentLineBreak:
35
31
  Enabled: true
36
- Severity: warning
37
32
 
38
- Layout/TrailingWhitespace:
33
+ Layout/FirstHashElementLineBreak:
39
34
  Enabled: true
40
- Severity: warning
41
35
 
42
- Lint/DuplicateMethods:
36
+ Layout/HeredocArgumentClosingParenthesis:
43
37
  Enabled: true
44
- Severity: warning
45
38
 
46
- Style/SpecialGlobalVars:
39
+ Layout/SpaceBeforeBrackets:
47
40
  Enabled: true
48
- Severity: warning
49
41
 
50
- Style/ColonMethodCall:
51
- Enabled: true
52
- Severity: warning
42
+ ###### COPS REVIEWED ABOVE THIS LINE ######
53
43
 
54
- Style/RedundantReturn:
44
+ Lint/AmbiguousAssignment:
55
45
  Enabled: true
56
- Severity: warning
57
46
 
58
- Style/NestedParenthesizedCalls:
47
+ Lint/AmbiguousBlockAssociation:
48
+ Exclude:
49
+ - spec/**/*
50
+
51
+ Lint/AmbiguousOperator:
59
52
  Enabled: true
60
53
 
61
- Layout/MultilineMethodCallIndentation:
54
+ Lint/AmbiguousRegexpLiteral:
62
55
  Enabled: true
63
56
 
64
- Style/RedundantParentheses:
57
+ Lint/BinaryOperatorWithIdenticalOperands:
65
58
  Enabled: true
66
59
 
67
- Style/RedundantInterpolation:
68
- Enabled: false
60
+ Lint/CircularArgumentReference:
61
+ Enabled: true
69
62
 
70
- Layout/AssignmentIndentation:
63
+ Lint/ConstantDefinitionInBlock:
71
64
  Enabled: true
65
+ Exclude:
66
+ - spec/**/*.rb
72
67
 
73
- Style/MutableConstant:
74
- Enabled: false
68
+ Lint/DeprecatedClassMethods:
69
+ Enabled: true
75
70
 
76
- Style/ZeroLengthPredicate:
71
+ Lint/DeprecatedConstants:
77
72
  Enabled: true
78
73
 
79
- Style/ConditionalAssignment:
74
+ Lint/DeprecatedOpenSSLConstant:
80
75
  Enabled: true
81
76
 
82
- Style/NestedModifier:
77
+ Lint/DuplicateBranch:
83
78
  Enabled: true
84
79
 
85
- Style/IfInsideElse:
80
+ Lint/DuplicateElsifCondition:
86
81
  Enabled: true
87
82
 
88
- Lint/IneffectiveAccessModifier:
83
+ Lint/DuplicateHashKey:
89
84
  Enabled: false
90
85
 
91
- Lint/ImplicitStringConcatenation:
92
- Enabled: true
93
-
94
- Lint/UselessAssignment:
86
+ Lint/DuplicateMethods:
95
87
  Enabled: true
96
88
  Severity: warning
97
89
 
98
- Lint/UnusedBlockArgument:
90
+ Lint/DuplicateRegexpCharacterClassElement:
99
91
  Enabled: true
100
- Severity: warning
101
92
 
102
- Lint/UnderscorePrefixedVariableName:
93
+ Lint/DuplicateRequire:
103
94
  Enabled: true
104
- Severity: warning
105
-
106
- Style/Documentation:
107
- Enabled: false
108
-
109
- Layout/SpaceInsideBlockBraces:
110
- Enabled: false
111
95
 
112
- Layout/SpaceInsideArrayLiteralBrackets:
96
+ Lint/DuplicateRescueException:
113
97
  Enabled: true
114
98
 
115
- Layout/SpaceInsideReferenceBrackets:
99
+ Lint/EmptyBlock:
116
100
  Enabled: true
117
101
 
118
- Layout/SpaceInsideHashLiteralBraces:
119
- Enabled: false
120
-
121
- Layout/SpaceInsideParens:
102
+ Lint/EmptyClass:
122
103
  Enabled: true
123
104
 
124
- Layout/SpaceBeforeComma:
105
+ Lint/EmptyConditionalBody:
125
106
  Enabled: true
126
107
 
127
- Layout/IndentationConsistency:
108
+ Lint/EmptyFile:
128
109
  Enabled: true
129
110
 
130
- Layout/CaseIndentation:
111
+ Lint/FloatComparison:
131
112
  Enabled: true
132
113
 
133
- Style/MethodDefParentheses:
114
+ Lint/IdentityComparison:
134
115
  Enabled: true
135
116
 
136
- Style/MultilineTernaryOperator:
117
+ Lint/ImplicitStringConcatenation:
137
118
  Enabled: true
138
119
 
139
- Style/NestedTernaryOperator:
140
- Enabled: true
120
+ Lint/IneffectiveAccessModifier:
121
+ Enabled: false
141
122
 
142
- Style/UnlessElse:
123
+ Lint/LambdaWithoutLiteralBlock:
143
124
  Enabled: true
144
125
 
145
- Style/SymbolArray:
146
- EnforcedStyle: brackets
147
-
148
- Style/WordArray:
149
- EnforcedStyle: brackets
126
+ Lint/MissingSuper:
127
+ Enabled: false
150
128
 
151
- Style/ParenthesesAroundCondition:
129
+ Lint/MixedRegexpCaptureTypes:
152
130
  Enabled: true
153
131
 
154
- Layout/MultilineBlockLayout:
132
+ Lint/NoReturnInBeginEndBlocks:
155
133
  Enabled: true
156
134
 
157
- Layout/InitialIndentation:
135
+ Lint/OutOfRangeRegexpRef:
158
136
  Enabled: true
159
137
 
160
- Style/OptionalArguments:
138
+ Lint/RaiseException:
161
139
  Enabled: true
162
140
 
163
- Lint/DuplicateHashKey:
164
- Enabled: false
165
-
166
- Lint/CircularArgumentReference:
141
+ Lint/RedundantDirGlobSort:
167
142
  Enabled: true
168
143
 
169
- Lint/AmbiguousOperator:
144
+ Lint/SelfAssignment:
170
145
  Enabled: true
171
146
 
172
- Lint/AmbiguousRegexpLiteral:
147
+ Lint/StructNewOverride:
173
148
  Enabled: true
174
149
 
175
- Layout/BlockAlignment:
150
+ Lint/ToEnumArguments:
176
151
  Enabled: true
177
152
 
178
- Layout/DefEndAlignment:
153
+ Lint/TopLevelReturnWithArgument:
179
154
  Enabled: true
180
155
 
181
- Lint/DeprecatedClassMethods:
156
+ Lint/TrailingCommaInAttributeDeclaration:
182
157
  Enabled: true
183
158
 
184
- Layout/EndAlignment:
159
+ Lint/UnderscorePrefixedVariableName:
185
160
  Enabled: true
161
+ Severity: warning
186
162
 
187
- Lint/UselessAccessModifier:
188
- Enabled: false
189
-
190
- Lint/Void:
163
+ Lint/UnexpectedBlockArity:
191
164
  Enabled: true
192
165
 
193
- Style/Alias:
194
- Enabled: false
195
-
196
- Layout/SpaceAroundBlockParameters:
166
+ Lint/UnmodifiedReduceAccumulator:
197
167
  Enabled: true
198
168
 
199
- Layout/SpaceAroundEqualsInParameterDefault:
169
+ Lint/UnreachableLoop:
200
170
  Enabled: true
201
171
 
202
- Style/RedundantBegin:
172
+ Lint/UnusedBlockArgument:
203
173
  Enabled: true
174
+ Severity: warning
204
175
 
205
- Style/RedundantException:
206
- Enabled: true
176
+ Lint/UselessAccessModifier:
177
+ Enabled: false
207
178
 
208
- Layout/EmptyLines:
179
+ Lint/UselessAssignment:
209
180
  Enabled: true
181
+ Severity: warning
210
182
 
211
- Style/SelfAssignment:
183
+ Lint/UselessMethodDefinition:
212
184
  Enabled: true
213
185
 
214
- Style/LambdaCall:
186
+ Lint/UselessTimes:
215
187
  Enabled: true
216
188
 
217
- Metrics/ModuleLength:
189
+ Lint/Void:
218
190
  Enabled: true
219
191
 
220
192
  Metrics/BlockLength:
221
193
  Exclude:
222
194
  - spec/**/*.rb
223
-
224
- Style/For:
225
- Enabled: true
226
-
227
- Layout/ExtraSpacing:
228
- Enabled: false
229
-
230
- Style/GuardClause:
231
- Enabled: false
232
-
233
- Style/FrozenStringLiteralComment:
234
- Enabled: false
235
-
236
- Style/StringLiterals:
237
- Enabled: false
238
-
195
+ -
239
196
  Metrics/ClassLength:
240
197
  Max: 512
241
198
  Enabled: true
242
199
 
243
- Layout/LineLength:
200
+ Metrics/ModuleLength:
244
201
  Enabled: true
245
- Max: 120
246
202
 
247
- Layout/ArgumentAlignment:
203
+ Naming/FileName:
248
204
  Enabled: true
249
205
 
250
- Style/HashEachMethods:
251
- Enabled: false
252
-
253
- Style/HashTransformKeys:
206
+ Naming/VariableName:
254
207
  Enabled: true
208
+ EnforcedStyle: snake_case
209
+ SupportedStyles:
210
+ - snake_case
211
+ - camelCase
255
212
 
256
- Style/HashTransformValues:
213
+ Style/AccessorGrouping:
257
214
  Enabled: true
258
215
 
259
- Layout/EmptyLinesAroundAttributeAccessor:
260
- Enabled: true
216
+ Style/Alias:
217
+ Enabled: false
261
218
 
262
- Layout/SpaceAroundMethodCallOperator:
219
+ Style/ArgumentsForwarding:
263
220
  Enabled: true
264
221
 
265
- Lint/DeprecatedOpenSSLConstant:
222
+ Style/ArrayCoercion:
266
223
  Enabled: true
267
224
 
268
- Lint/DuplicateElsifCondition:
225
+ Style/BisectedAttrAccessor:
269
226
  Enabled: true
270
227
 
271
- Lint/MixedRegexpCaptureTypes:
228
+ Style/CaseLikeIf:
272
229
  Enabled: true
273
230
 
274
- Lint/RaiseException:
231
+ Style/CollectionCompact:
275
232
  Enabled: true
276
233
 
277
- Lint/StructNewOverride:
234
+ Style/ColonMethodCall:
278
235
  Enabled: true
236
+ Severity: warning
279
237
 
280
- Style/AccessorGrouping:
238
+ Style/CombinableLoops:
281
239
  Enabled: true
282
240
 
283
- Style/ArrayCoercion:
241
+ Style/ConditionalAssignment:
284
242
  Enabled: true
285
243
 
286
- Style/BisectedAttrAccessor:
244
+ Style/DocumentDynamicEvalDefinition:
245
+ Enabled: false
246
+
247
+ Style/Documentation:
248
+ Enabled: false
249
+
250
+ Style/EndlessMethod:
287
251
  Enabled: true
288
252
 
289
- Style/CaseLikeIf:
253
+ Style/ExplicitBlockArgument:
290
254
  Enabled: true
291
255
 
292
256
  Style/ExponentialNotation:
293
257
  Enabled: false
294
258
 
295
- Style/HashAsLastArrayItem:
259
+ Style/For:
296
260
  Enabled: true
297
261
 
298
- Style/HashLikeCase:
262
+ Style/FormatString:
299
263
  Enabled: false
300
264
 
301
- Style/RedundantAssignment:
302
- Enabled: true
265
+ Style/FormatStringToken:
266
+ Enabled: false
303
267
 
304
- Style/RedundantFetchBlock:
305
- Enabled: true
268
+ Style/FrozenStringLiteralComment:
269
+ Enabled: false
306
270
 
307
- Style/RedundantFileExtensionInRequire:
271
+ Style/GlobalStdStream:
308
272
  Enabled: true
309
273
 
310
- Style/RedundantRegexpCharacterClass:
311
- Enabled: true
274
+ Style/GuardClause:
275
+ Enabled: false
312
276
 
313
- Style/RedundantRegexpEscape:
277
+ Style/HashAsLastArrayItem:
314
278
  Enabled: true
315
279
 
316
- Style/SlicingWithRange:
280
+ Style/HashEachMethods:
317
281
  Enabled: false
318
282
 
319
- Layout/BeginEndAlignment:
283
+ Style/HashExcept:
320
284
  Enabled: true
321
285
 
322
- Lint/BinaryOperatorWithIdenticalOperands:
323
- Enabled: true
286
+ Style/HashLikeCase:
287
+ Enabled: false
324
288
 
325
- Lint/ConstantDefinitionInBlock:
289
+ Style/HashTransformKeys:
326
290
  Enabled: true
327
- Exclude:
328
- - spec/**/*.rb
329
291
 
330
- Lint/DuplicateRequire:
292
+ Style/HashTransformValues:
331
293
  Enabled: true
332
294
 
333
- Lint/DuplicateRescueException:
295
+ Style/IfInsideElse:
334
296
  Enabled: true
335
297
 
336
- Lint/EmptyConditionalBody:
298
+ Style/KeywordParametersOrder:
337
299
  Enabled: true
338
300
 
339
- Lint/EmptyFile:
301
+ Style/LambdaCall:
340
302
  Enabled: true
341
303
 
342
- Lint/FloatComparison:
304
+ Style/MethodDefParentheses:
343
305
  Enabled: true
344
306
 
345
- Lint/IdentityComparison:
307
+ Style/MultilineTernaryOperator:
346
308
  Enabled: true
347
309
 
348
- Lint/MissingSuper:
310
+ Style/MutableConstant:
349
311
  Enabled: false
350
312
 
351
- Lint/OutOfRangeRegexpRef:
313
+ Style/NegatedIfElseCondition:
352
314
  Enabled: true
353
315
 
354
- Lint/SelfAssignment:
316
+ Style/NestedModifier:
355
317
  Enabled: true
356
318
 
357
- Lint/TopLevelReturnWithArgument:
319
+ Style/NestedParenthesizedCalls:
358
320
  Enabled: true
359
321
 
360
- Lint/TrailingCommaInAttributeDeclaration:
322
+ Style/NestedTernaryOperator:
361
323
  Enabled: true
362
324
 
363
- Lint/UnreachableLoop:
325
+ Style/NilLambda:
364
326
  Enabled: true
365
327
 
366
- Lint/UselessMethodDefinition:
367
- Enabled: true
328
+ Style/NumericPredicate:
329
+ Enabled: false
368
330
 
369
- Lint/UselessTimes:
331
+ Style/OptionalArguments:
370
332
  Enabled: true
371
333
 
372
- Style/CombinableLoops:
334
+ Style/OptionalBooleanParameter:
373
335
  Enabled: true
374
336
 
375
- Style/ExplicitBlockArgument:
337
+ Style/ParenthesesAroundCondition:
376
338
  Enabled: true
377
339
 
378
- Style/GlobalStdStream:
340
+ Style/RedundantArgument:
379
341
  Enabled: true
380
342
 
381
- Style/KeywordParametersOrder:
343
+ Style/RedundantAssignment:
382
344
  Enabled: true
383
345
 
384
- Style/OptionalBooleanParameter:
346
+ Style/RedundantBegin:
385
347
  Enabled: true
386
348
 
387
- Style/RedundantSelfAssignment:
349
+ Style/RedundantException:
388
350
  Enabled: true
389
351
 
390
- Style/SingleArgumentDig:
352
+ Style/RedundantFetchBlock:
391
353
  Enabled: true
392
354
 
393
- Style/SoleNestedConditional:
355
+ Style/RedundantFileExtensionInRequire:
394
356
  Enabled: true
395
357
 
396
- Style/StringConcatenation:
397
- Enabled: true
358
+ Style/RedundantInterpolation:
359
+ Enabled: false
398
360
 
399
- Lint/DuplicateRegexpCharacterClassElement:
361
+ Style/RedundantParentheses:
400
362
  Enabled: true
401
363
 
402
- Lint/EmptyBlock:
364
+ Style/RedundantRegexpCharacterClass:
403
365
  Enabled: true
404
366
 
405
- Lint/ToEnumArguments:
367
+ Style/RedundantRegexpEscape:
406
368
  Enabled: true
407
369
 
408
- Lint/UnmodifiedReduceAccumulator:
370
+ Style/RedundantReturn:
409
371
  Enabled: true
372
+ Severity: warning
410
373
 
411
- Style/ArgumentsForwarding:
374
+ Style/RedundantSelfAssignment:
412
375
  Enabled: true
413
376
 
414
- Style/DocumentDynamicEvalDefinition:
415
- Enabled: false
416
-
417
- Style/SwapValues:
377
+ Style/SelfAssignment:
418
378
  Enabled: true
419
379
 
420
- Lint/AmbiguousBlockAssociation:
421
- Exclude:
422
- - spec/**/*
423
-
424
- Layout/FirstHashElementIndentation:
425
- EnforcedStyle: consistent
426
-
427
- Style/FormatString:
428
- Enabled: false
429
-
430
- Style/FormatStringToken:
431
- Enabled: false
380
+ Style/SingleArgumentDig:
381
+ Enabled: true
432
382
 
433
- Style/NumericPredicate:
383
+ Style/SlicingWithRange:
434
384
  Enabled: false
435
385
 
436
- Lint/NoReturnInBeginEndBlocks:
386
+ Style/SoleNestedConditional:
437
387
  Enabled: true
438
388
 
439
- Style/CollectionCompact:
389
+ Style/SpecialGlobalVars:
440
390
  Enabled: true
391
+ Severity: warning
441
392
 
442
- Style/NegatedIfElseCondition:
393
+ Style/StringConcatenation:
443
394
  Enabled: true
444
395
 
445
- Lint/DuplicateBranch:
446
- Enabled: true
396
+ Style/StringLiterals:
397
+ Enabled: false
447
398
 
448
- Lint/EmptyClass:
449
- Enabled: true
450
-
451
- Style/NilLambda:
399
+ Style/SwapValues:
452
400
  Enabled: true
453
401
 
454
- Lint/UnexpectedBlockArity:
402
+ Style/SymbolArray:
403
+ EnforcedStyle: brackets
404
+
405
+ Style/UnlessElse:
455
406
  Enabled: true
456
407
 
457
- Style/RedundantArgument:
408
+ Style/WordArray:
409
+ EnforcedStyle: brackets
410
+
411
+ Style/ZeroLengthPredicate:
458
412
  Enabled: true
@@ -1,6 +1,3 @@
1
- AllCops:
2
- ExtraDetails: true
3
-
4
1
  require:
5
2
  - './lib/simplycop/custom_cops/constantize.rb'
6
3
  - './lib/simplycop/custom_cops/define_method.rb'
@@ -7,5 +7,5 @@
7
7
  #
8
8
 
9
9
  module Simplycop
10
- VERSION = '1.4.2'
10
+ VERSION = '1.5.0'
11
11
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_dependency 'rubocop', '~> 1.6.1'
20
+ spec.add_dependency 'rubocop', '~> 1.8.1'
21
21
  spec.add_dependency 'rubocop-rails', '~> 2.9.0'
22
22
  spec.add_dependency 'rubocop-rspec', '~> 2.1.0'
23
23
  spec.add_development_dependency 'bundler'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplycop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simply Business
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2021-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.1
19
+ version: 1.8.1
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: 1.6.1
26
+ version: 1.8.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.1.4
157
+ rubygems_version: 3.2.3
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Provides a single point of reference for common rubocop rules.