simplycop 1.12.20 → 1.12.22

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d7b1dfbe91cd595f0491440519bdaf520cb4dfe9048ab500e5ed37f9a83eda2
4
- data.tar.gz: ed90b05962cb6537ff3370271a67659771232fcce4a35f535231b4bcd67f134e
3
+ metadata.gz: 4300fe0cef92b1860b5f9778f1841ebd1db3341ef2a752dfc2d5033c4d9e4beb
4
+ data.tar.gz: 78b46b78d6f1dce94788fde32a06531c037857547d2b1c6ef98e87b700545c93
5
5
  SHA512:
6
- metadata.gz: 20cf2ce53fc721de021c0be9f0fb63e119504b44599dfe3ce6f0d39afc6d5ba9cb79fcd9b91331dc3cd8852b51f4e998d7ae90206674cacd002cdba62963026b
7
- data.tar.gz: 4468e20beee4c4c03a12fc80599f92498a192f84d2842e8e8ce8aa056f1b59091eccdd2ae43905be36c4447c0d31e18af4b81cb74de99927dc6824431ad6864d
6
+ metadata.gz: 4f19dd0c98414a22df7d38285caeb140b92d80618dad5c462e93939d270090dbf623002d18f43088d9f57ce2b68b199b612d8172329e47442efeef104c70e08e
7
+ data.tar.gz: aed4ed02ab4fba9da43e3ae962f2f8b55a327f1af0881f98734eae7d3bd2e4d8bf07e183f15aa300b639438bf5228fa1e1145e4c51464214e0790f19622cafb9
data/.simplycop.yml CHANGED
@@ -21,25 +21,214 @@ AllCops:
21
21
  ExtraDetails: true
22
22
  # Adapted from: https://github.com/simplybusiness/how-we-roll/blob/master/development/RUBYSTYLEGUIDE.markdown
23
23
 
24
+ Bundler/DuplicatedGem:
25
+ Enabled: true
26
+
27
+ Bundler/GemComment:
28
+ Enabled: false
29
+
30
+ Bundler/GemFilename:
31
+ Enabled: true
32
+
33
+ # To discuss: Suggest true but 103 fails on Chopin, 10 on Rater
34
+ # Bundler/GemVersion:
35
+ # Enabled: true
36
+
37
+ Bundler/InsecureProtocolSource:
38
+ Enabled: true
39
+
40
+ Bundler/OrderedGems:
41
+ Enabled: true
42
+
43
+ # To discuss: Suggest true but 3 fails on Chopin, 21 on Rater
44
+ # Gemspec/DependencyVersion:
45
+ # Enabled: true
46
+
47
+ # TODO: 1 autocorrectable in Rater and it would pass
48
+ # Gemspec/DeprecatedAttributeAssignment:
49
+ # Enabled: true
50
+
51
+ # To discuss: Suggest true but 2 fails on Chopin, 10 on Rater
52
+ # Gemspec/DevelopmentDependencies:
53
+ # Enabled: true
54
+
55
+ Gemspec/DuplicatedAssignment:
56
+ Enabled: true
57
+
58
+ Gemspec/OrderedDependencies:
59
+ Enabled: true
60
+
61
+ # TODO: Suggest true but 4 fails on Chopin, 3 on Rater
62
+ # Gemspec/RequireMFA:
63
+ # Enabled: true
64
+
65
+ # TODO: Suggest true but 3 fails on Chopin
66
+ # Gemspec/RequiredRubyVersion:
67
+ # Enabled: true
68
+
69
+ Gemspec/RubyVersionGlobalsUsage:
70
+ Enabled: true
71
+
72
+ Layout/AccessModifierIndentation:
73
+ Enabled: true
74
+
75
+ Layout/ArgumentAlignment:
76
+ Enabled: true
77
+
78
+ Layout/ArrayAlignment:
79
+ Enabled: true
80
+
81
+ Layout/AssignmentIndentation:
82
+ Enabled: true
83
+
84
+ Layout/BeginEndAlignment:
85
+ Enabled: true
86
+
87
+ Layout/BlockAlignment:
88
+ Enabled: true
89
+
90
+ Layout/BlockEndNewline:
91
+ Enabled: true
92
+
93
+ Layout/CaseIndentation:
94
+ Enabled: true
95
+
96
+ # Discussion needed about preferred structure. Dozens of fails on each repo if we stick with default, all but 4 on Chopin are autocorrectable
97
+ # Layout/ClassStructure:
98
+ # Enabled: true
99
+
100
+ Layout/ClosingHeredocIndentation:
101
+ Enabled: true
102
+
103
+ Layout/ClosingParenthesisIndentation:
104
+ Enabled: true
105
+
106
+ Layout/CommentIndentation:
107
+ Enabled: true
108
+
109
+ Layout/ConditionPosition:
110
+ Enabled: true
111
+
112
+ Layout/DefEndAlignment:
113
+ Enabled: true
114
+
115
+ Layout/DotPosition:
116
+ Enabled: true
117
+
118
+ Layout/ElseAlignment:
119
+ Enabled: true
120
+
121
+ Layout/EmptyComment:
122
+ Enabled: true
24
123
 
25
- Gemspec/DeprecatedAttributeAssignment: # new in 1.30
124
+ Layout/EmptyLineAfterGuardClause:
26
125
  Enabled: true
27
126
 
127
+ # To discuss. Suggest should be true but 500+ autocorrectable fails on Chopin. None on others
128
+ # Layout/EmptyLineAfterMagicComment:
129
+ # Enabled: true
130
+
28
131
  Layout/EmptyLineAfterMultilineCondition:
29
132
  Enabled: true
30
133
 
134
+ Layout/EmptyLineBetweenDefs:
135
+ Enabled: true
136
+
137
+ Layout/EmptyLines:
138
+ Enabled: true
139
+
140
+ Layout/EmptyLinesAroundAccessModifier:
141
+ Enabled: true
142
+
143
+ Layout/EmptyLinesAroundArguments:
144
+ Enabled: true
145
+
146
+ Layout/EmptyLinesAroundAttributeAccessor:
147
+ Enabled: true
148
+
149
+ Layout/EmptyLinesAroundBeginBody:
150
+ Enabled: true
151
+
152
+ Layout/EmptyLinesAroundBlockBody:
153
+ Enabled: true
154
+
155
+ Layout/EmptyLinesAroundClassBody:
156
+ Enabled: true
157
+
158
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
159
+ Enabled: true
160
+
161
+ Layout/EmptyLinesAroundMethodBody:
162
+ Enabled: true
163
+
164
+ Layout/EmptyLinesAroundModuleBody:
165
+ Enabled: true
166
+
167
+ Layout/EndAlignment:
168
+ Enabled: true
169
+
170
+ Layout/EndOfLine:
171
+ Enabled: true
172
+
173
+ Layout/ExtraSpacing:
174
+ Enabled: true
175
+
176
+ Layout/FirstArgumentIndentation:
177
+ Enabled: true
178
+
179
+ Layout/FirstArrayElementIndentation:
180
+ Enabled: true
181
+
31
182
  Layout/FirstArrayElementLineBreak:
32
183
  Enabled: true
33
184
 
34
185
  Layout/FirstMethodArgumentLineBreak:
35
186
  Enabled: true
36
187
 
188
+ Layout/FirstHashElementIndentation:
189
+ Enabled: true
190
+
37
191
  Layout/FirstHashElementLineBreak:
38
192
  Enabled: true
39
193
 
194
+ # To discuss - 200+ fails on CoCo, none elsewhere
195
+ # Layout/FirstMethodArgumentLineBreak:
196
+ # Enabled: true
197
+
198
+ # To discuss - 100+ fails on Chopin, handful on others
199
+ # Layout/FirstMethodParameterLineBreak:
200
+ # Enabled: true
201
+
202
+ Layout/FirstParameterIndentation:
203
+ Enabled: true
204
+
205
+ Layout/HashAlignment:
206
+ Enabled: true
207
+
40
208
  Layout/HeredocArgumentClosingParenthesis:
41
209
  Enabled: true
42
210
 
211
+ Layout/HeredocIndentation:
212
+ Enabled: true
213
+
214
+ Layout/IndentationConsistency:
215
+ Enabled: true
216
+
217
+ Layout/IndentationStyle:
218
+ Enabled: true
219
+
220
+ Layout/IndentationWidth:
221
+ Enabled: true
222
+
223
+ Layout/InitialIndentation:
224
+ Enabled: true
225
+
226
+ Layout/LeadingCommentSpace:
227
+ Enabled: true
228
+
229
+ Layout/LeadingEmptyLines:
230
+ Enabled: true
231
+
43
232
  Layout/LineContinuationLeadingSpace:
44
233
  Enabled: true
45
234
 
@@ -49,9 +238,148 @@ Layout/LineContinuationSpacing:
49
238
  Layout/LineEndStringConcatenationIndentation:
50
239
  Enabled: true
51
240
 
241
+ # To discuss: configure line length? At default 120: 6805 fails on Chopin, 3 on Rater, 179 on CoCo
242
+ # Layout/LineLength
243
+ # Enabled: false
244
+ Layout/MultilineArrayBraceLayout:
245
+ Enabled: true
246
+
247
+ # To discuss: 100s of fails on each repo but autocorrectable
248
+ # Layout/MultilineArrayLineBreaks:
249
+ # Enabled: true
250
+
251
+ # To discuss: 100s of fails on each repo but autocorrectable
252
+ # Layout/MultilineAssignmentLayout:
253
+ # Enabled: true
254
+
255
+ Layout/MultilineBlockLayout:
256
+ Enabled: true
257
+
258
+ Layout/MultilineHashBraceLayout:
259
+ Enabled: true
260
+
261
+ # To discuss: 100s of fails on each repo but autocorrectable
262
+ # Layout/MultilineHashKeyLineBreaks:
263
+ # Enabled: true
264
+
265
+ # To discuss: 1000s of fails on each repo but autocorrectable
266
+ # Layout/MultilineMethodArgumentLineBreaks:
267
+ # Enabled: true
268
+
269
+ Layout/MultilineMethodCallBraceLayout:
270
+ Enabled: true
271
+
272
+ Layout/MultilineMethodCallIndentation:
273
+ Enabled: true
274
+
275
+ Layout/MultilineMethodDefinitionBraceLayout:
276
+ Enabled: true
277
+
278
+ # To discuss: 100s of fails on each repo but autocorrectable
279
+ # Layout/MultilineMethodParameterLineBreaks:
280
+ # Enabled: true
281
+
282
+ Layout/MultilineOperationIndentation:
283
+ Enabled: true
284
+
285
+ Layout/ParameterAlignment:
286
+ Enabled: true
287
+
288
+ # For discussion: 1000s of fails, all autocorrectable
289
+ # Layout/RedundantLineBreak:
290
+ # Enabled: true
291
+
292
+ Layout/RescueEnsureAlignment:
293
+ Enabled: true
294
+
295
+ # For discussion: 1000s of fails, all autocorrectable
296
+ # Layout/SingleLineBlockChain:
297
+ # Enabled: true
298
+
299
+ Layout/SpaceAfterColon:
300
+ Enabled: true
301
+
302
+ Layout/SpaceAfterComma:
303
+ Enabled: true
304
+
305
+ Layout/SpaceAfterMethodName:
306
+ Enabled: true
307
+
308
+ Layout/SpaceAfterNot:
309
+ Enabled: true
310
+
311
+ Layout/SpaceAfterSemicolon:
312
+ Enabled: true
313
+
314
+ Layout/SpaceAroundBlockParameters:
315
+ Enabled: true
316
+
317
+ Layout/SpaceAroundEqualsInParameterDefault:
318
+ Enabled: true
319
+
320
+ Layout/SpaceAroundKeyword:
321
+ Enabled: true
322
+
323
+ Layout/SpaceAroundMethodCallOperator:
324
+ Enabled: true
325
+
326
+ Layout/SpaceAroundOperators:
327
+ Enabled: true
328
+
329
+ Layout/SpaceBeforeBlockBraces:
330
+ Enabled: true
331
+
52
332
  Layout/SpaceBeforeBrackets:
53
333
  Enabled: true
54
334
 
335
+ Layout/SpaceBeforeComma:
336
+ Enabled: true
337
+
338
+ Layout/SpaceBeforeComment:
339
+ Enabled: true
340
+
341
+ Layout/SpaceBeforeFirstArg:
342
+ Enabled: true
343
+
344
+ Layout/SpaceBeforeSemicolon:
345
+ Enabled: true
346
+
347
+ Layout/SpaceInLambdaLiteral:
348
+ Enabled: true
349
+
350
+ Layout/SpaceInsideArrayLiteralBrackets:
351
+ Enabled: true
352
+
353
+ Layout/SpaceInsideArrayPercentLiteral:
354
+ Enabled: true
355
+
356
+ Layout/SpaceInsideBlockBraces:
357
+ Enabled: true
358
+
359
+ Layout/SpaceInsideHashLiteralBraces:
360
+ Enabled: true
361
+
362
+ Layout/SpaceInsideParens:
363
+ Enabled: true
364
+
365
+ Layout/SpaceInsidePercentLiteralDelimiters:
366
+ Enabled: true
367
+
368
+ Layout/SpaceInsideRangeLiteral:
369
+ Enabled: true
370
+
371
+ Layout/SpaceInsideReferenceBrackets:
372
+ Enabled: true
373
+
374
+ Layout/SpaceInsideStringInterpolation:
375
+ Enabled: true
376
+
377
+ Layout/TrailingEmptyLines:
378
+ Enabled: true
379
+
380
+ Layout/TrailingWhitespace:
381
+ Enabled: true
382
+
55
383
  Lint/AmbiguousAssignment:
56
384
  Enabled: true
57
385
 
@@ -154,18 +482,99 @@ Metrics/ParameterLists:
154
482
  CountKeywordArgs: false
155
483
  Enabled: true
156
484
 
157
- Naming/BlockForwarding: # new in 1.24
485
+ Migration/DepartmentName:
486
+ Enabled: true
487
+
488
+ # Suggest true but causes 17 fails in Chopin, 6 in Rater, 2 in CoCo
489
+ # Naming/AccessorMethodName:
490
+ # Enabled: true
491
+
492
+ Naming/AsciiIdentifiers:
493
+ Enabled: true
494
+
495
+ Naming/BinaryOperatorParameterName:
496
+ Enabled: true
497
+
498
+ Naming/BlockForwarding:
499
+ Enabled: true
500
+
501
+ Naming/BlockParameterName:
502
+ Enabled: true
503
+
504
+ Naming/ClassAndModuleCamelCase:
505
+ Enabled: true
506
+
507
+ Naming/ConstantName:
508
+ Enabled: true
509
+
510
+ Naming/FileName:
511
+ Enabled: true
512
+
513
+ Naming/HeredocDelimiterCase:
514
+ Enabled: true
515
+
516
+ Naming/HeredocDelimiterNaming:
158
517
  Enabled: true
159
518
 
160
519
  Naming/InclusiveLanguage:
161
520
  Enabled: true
162
521
 
522
+ # To discuss: suggest true but 86 fails on Chopin
523
+ # Naming/MemoizedInstanceVariableName:
524
+ # Enabled: true
525
+
526
+ Naming/MethodName:
527
+ Enabled: true
528
+
529
+ # To discuss: suggest true with possible allowed exceptions as below (10 fails on Chopin, exceptions would allow 4)
530
+ # Naming/MethodParameterName:
531
+ # Enabled: true
532
+ # AllowedNames:
533
+ # - e
534
+ # - ex
535
+ # - n
536
+
537
+ # To discuss: suggest true but 52 fails in Chopin, 8 in Coco (consider with Naming/AccessorName)
538
+ # Naming/PredicateName:
539
+ # Enabled: true
540
+
541
+ # To discuss: Should decide on a style. Default e instead of err causes 47 fails on Chopin, none on Rater, CoCo
542
+ # Naming/RescuedExceptionsVariableName:
543
+ # Enabled: true
544
+
545
+ Naming/VariableName:
546
+ Enabled: true
547
+
548
+ # To discuss: suggest enforce snake_case as this seems to be the preferred style
549
+ # Default normalcase causes
550
+ # Naming/VariableNumber:
551
+ # Enabled: true
552
+ # EnforcedStyle: snake_case
553
+
163
554
  Security/CompoundHash:
164
555
  Enabled: true
165
556
 
557
+ # Should probably be set to true but 13 offences in chopin spec
558
+ # Security/Eval:
559
+ # Enabled: true
560
+
166
561
  Security/IoMethods:
167
562
  Enabled: true
168
563
 
564
+ # Should probably be set to true but 18 offences in chopin spec
565
+ # Security/JSONLoad:
566
+ # Enabled: true
567
+
568
+ Security/MarshalLoad:
569
+ Enabled: true
570
+
571
+ Security/Open:
572
+ Enabled: true
573
+
574
+ # Two fails on ContinuousCover, others fine
575
+ # Security/YAMLLoad:
576
+ # Enabled: true
577
+
169
578
  Style/AccessModifierDeclarations:
170
579
  Enabled: false
171
580
 
data/.simplycop_rspec.yml CHANGED
@@ -117,6 +117,9 @@ Capybara/SpecificMatcher:
117
117
  FactoryBot/ConsistentParenthesesStyle:
118
118
  Enabled: true
119
119
 
120
+ FactoryBot/CreateList:
121
+ Enabled: false
122
+
120
123
  FactoryBot/FactoryNameStyle:
121
124
  Enabled: true
122
125
 
@@ -7,5 +7,5 @@
7
7
  #
8
8
 
9
9
  module Simplycop
10
- VERSION = '1.12.20'
10
+ VERSION = '1.12.22'
11
11
  end
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.12.20
4
+ version: 1.12.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simply Business
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-22 00:00:00.000000000 Z
11
+ date: 2023-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop