rubocop-rubomatic 1.6.0.rc.pre.1 → 1.6.0.rc.pre.3

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: 0c2428f17fa3a09ef250e03a6561c4de254ee61052b956c78c917d56fa2b85a6
4
- data.tar.gz: 193c58c2cd0c1ca4b06f193b093440adb497353a33ab4fa61ba0402f6f879487
3
+ metadata.gz: 366175b4cee4057a13a3aa830e3d3b6d5792a4a8769ecbf05c242d45d04b02e6
4
+ data.tar.gz: 1b46b321dfaa75c7a0dc6a8414a1b8f70ba255b4c4d736f0d779554a921b9a1f
5
5
  SHA512:
6
- metadata.gz: 983db2f236ae6127ea6fadbaba7651b46576f48489ad1c992adb87b53bd13a5f7d75a26e37e4a19b2b287ce6d1ab1bccb67be657cdd50f5da619adf70957c40c
7
- data.tar.gz: 4c387073a9cbd65b674f183792261ff50710f38c2782fbd92d42f5734cc9085212be1220c89c35ba971cd6ee0c2a5694e712cee7691225cfe4861a062f5ed1be
6
+ metadata.gz: 2c011520f266a5734ebc12d6ace5c9089db36686761232b901ace8179ac24a852e0b7c6928b6013091c4a78e629fb7ba2c172d6e8034f0cd22cd58380965975b
7
+ data.tar.gz: 1b11a43dab354bd17f100a8d987634211f828868077b37a58a8a6f4c5cf1fb9fd551e45a7fff8eeb167042b12a57632bb85cee4df7c0da06f39146815851b682
data/CHANGELOG.adoc CHANGED
@@ -3,6 +3,54 @@
3
3
  * Upgrade to ``ruobcop 1.76.1``
4
4
  ** This includes the change from ``require:`` to ``plugins:``.
5
5
  While ``require:`` will still work, there will be a deprecation warning
6
+ ** Set ``Layout/LeadingCommentSpace/AllowSteepAnnotation`` to ``false``
7
+ ** Enabled ``Lint/ArrayLiteralInRegexp``
8
+ ** Enabled ``Lint/ConstantReassignment``
9
+ ** Enabled ``Lint/CopDirectiveSyntax``
10
+ ** Enabled ``Lint/DuplicateSetElement``
11
+ ** Set ``Lint/DuplicateBranch/IgnoreDuplicateElseBranch`` to ``true``
12
+ ** Enabled ``Lint/HashNewWithKeywordArgumentsAsDefault``
13
+ ** Enabled ``Lint/NumericOperationWithConstantResult``
14
+ ** Enabled ``Lint/RedundantTypeConversion``
15
+ ** Enabled ``Lint/SharedMutableDefault``
16
+ ** Enabled ``Lint/SuppressedExceptionInNumberConversion``
17
+ ** Enabled ``Lint/UnescapedBracketInRegexp``
18
+ ** Enabled ``Lint/UselessConstantScoping``
19
+ ** Enabled ``Lint/UselessDefaultValueArgument``
20
+ ** Enabled ``Lint/UselessDefined``
21
+ ** Enabled ``Lint/UselessNumericOperation``
22
+ ** Enabled ``Lint/UselessOr``
23
+ ** Enabled ``Naming/PredicateMethod``
24
+ ** Enabled ``Style/AmbiguousEndlessMethodDefinition``
25
+ ** Enabled ``Style/BitwisePredicate``
26
+ ** Enabled ``Style/ComparableBetween``
27
+ ** Enabled ``Style/CombinableDefined``
28
+ ** Enabled ``Style/DigChain``
29
+ ** Enabled ``Style/EmptyStringInsideInterpolation``
30
+ ** Enabled ``Style/FileNull``
31
+ ** Enabled ``Style/FileTouch``
32
+ ** Enabled ``Style/HashFetchChain``
33
+ ** Enabled ``Style/HashSlice``
34
+ ** Enabled ``Style/ItAssignment``
35
+ ** Enabled ``Style/ItBlockParameter``
36
+ ** Enabled ``Style/KeywordArgumentsMergin``
37
+ ** Enabled ``Style/RedundantArrayFlatten``
38
+ ** Enabled ``Style/RedundantFormat``
39
+ ** Enabled ``Style/RedundantInterpolationUnfreeze``
40
+ ** Disabled ``Style/SafeNavigationChainLength``
41
+ * Added ``rack_attack.rb`` to exclude list for ``Style/IpAddresses``
42
+ * Upgraded to ``rubocop-performance 1.25.0``
43
+ ** Enabled ``Performance/StringBytesize``
44
+ ** Enabled ``Performance/ZipWithoutBlock``
45
+ * Added ``rubocop-packaging 0.6.0``
46
+ ** Enabled ``Packaging/GemspecGit``
47
+ * Added ``rubocop-thread_safety 0.7.2``
48
+ ** Enabled ``ThreadSafety/ClassAndModuleAttributes``
49
+ ** Enabled ``ThreadSafety/ClassInstanceVariable``
50
+ ** Enabled ``ThreadSafety/DirChdir``
51
+ ** Enabled ``ThreadSafety/MutableClassInstanceVariable``
52
+ ** Enabled ``ThreadSafety/NewThread``
53
+ ** Enabled ``ThreadSafety/RackMiddlewareInstanceVariable``
6
54
 
7
55
  == 1.5.1 (2024-10-22)
8
56
 
@@ -56,3 +56,11 @@ Gemspec/RubyVersionGlobalsUsage:
56
56
 
57
57
  Naming/FileName:
58
58
  Enabled: false
59
+
60
+ plugins: rubocop-packaging
61
+
62
+ Packaging:
63
+ Enabled: false
64
+
65
+ Packaging/GemspecGit:
66
+ Enabled: true
data/config/layout.yml CHANGED
@@ -526,6 +526,7 @@ Layout/LeadingCommentSpace:
526
526
  Enabled: true
527
527
  AllowDoxygenCommentStyle: false
528
528
  AllowGemfileRubyComment: false
529
+ AllowSteepAnnotation: false
529
530
 
530
531
  Layout/LeadingEmptyLines:
531
532
  Enabled: true
data/config/lint.yml CHANGED
@@ -19,6 +19,9 @@ Lint/AmbiguousRange:
19
19
  Lint/AmbiguousRegexpLiteral:
20
20
  Enabled: true
21
21
 
22
+ Lint/ArrayLiteralInRegexp:
23
+ Enabled: true
24
+
22
25
  Lint/AssignmentInCondition:
23
26
  Enabled: true
24
27
  AllowSafeAssignment: false
@@ -45,6 +48,9 @@ Lint/ConstantDefinitionInBlock:
45
48
  Lint/ConstantOverwrittenInRescue:
46
49
  Enabled: true
47
50
 
51
+ Lint/ConstantReassignment:
52
+ Enabled: true
53
+
48
54
  Lint/ConstantResolution:
49
55
  Enabled: false
50
56
  # Restrict this cop to only looking at certain names
@@ -52,6 +58,9 @@ Lint/ConstantResolution:
52
58
  # Restrict this cop from only looking at certain names
53
59
  Ignore: [ ]
54
60
 
61
+ Lint/CopDirectiveSyntax:
62
+ Enabled: true
63
+
55
64
  Lint/Debugger:
56
65
  Enabled: true
57
66
  DebuggerMethods:
@@ -139,6 +148,7 @@ Lint/DuplicateBranch:
139
148
  Enabled: true
140
149
  IgnoreLiteralBranches: true
141
150
  IgnoreConstantBranches: true
151
+ IgnoreDuplicateElseBranch: true
142
152
 
143
153
  Lint/DuplicateCaseCondition:
144
154
  Enabled: true
@@ -167,6 +177,9 @@ Lint/DuplicateRequire:
167
177
  Lint/DuplicateRescueException:
168
178
  Enabled: true
169
179
 
180
+ Lint/DuplicateSetElement:
181
+ Enabled: true
182
+
170
183
  Lint/EachWithObjectArgument:
171
184
  Enabled: true
172
185
 
@@ -228,6 +241,9 @@ Lint/FormatParameterMismatch:
228
241
  Lint/HashCompareByIdentity:
229
242
  Enabled: true
230
243
 
244
+ Lint/HashNewWithKeywordArgumentsAsDefault:
245
+ Enabled: true
246
+
231
247
  Lint/HeredocMethodCallPosition:
232
248
  Enabled: true
233
249
 
@@ -348,6 +364,9 @@ Lint/NumberConversion:
348
364
  Lint/NumberedParameterAssignment:
349
365
  Enabled: true
350
366
 
367
+ Lint/NumericOperationWithConstantResult:
368
+ Enabled: true
369
+
351
370
  Lint/OrAssignmentToConstant:
352
371
  Enabled: true
353
372
 
@@ -407,6 +426,9 @@ Lint/RedundantSplatExpansion:
407
426
  Lint/RedundantStringCoercion:
408
427
  Enabled: true
409
428
 
429
+ Lint/RedundantTypeConversion:
430
+ Enabled: true
431
+
410
432
  Lint/RedundantWithIndex:
411
433
  Enabled: true
412
434
 
@@ -478,6 +500,9 @@ Lint/ShadowedException:
478
500
  Lint/ShadowingOuterLocalVariable:
479
501
  Enabled: true
480
502
 
503
+ Lint/SharedMutableDefault:
504
+ Enabled: true
505
+
481
506
  Lint/StructNewOverride:
482
507
  Enabled: true
483
508
 
@@ -486,6 +511,9 @@ Lint/SuppressedException:
486
511
  AllowComments: true
487
512
  AllowNil: true
488
513
 
514
+ Lint/SuppressedExceptionInNumberConversion:
515
+ Enabled: true
516
+
489
517
  Lint/SymbolConversion:
490
518
  Enabled: true
491
519
  EnforcedStyle: consistent
@@ -515,6 +543,9 @@ Lint/UnderscorePrefixedVariableName:
515
543
  Enabled: true
516
544
  AllowKeywordBlockArguments: false
517
545
 
546
+ Lint/UnescapedBracketInRegexp:
547
+ Enabled: true
548
+
518
549
  Lint/UnexpectedBlockArity:
519
550
  Enabled: true
520
551
  Methods:
@@ -570,12 +601,29 @@ Lint/UselessAccessModifier:
570
601
  Lint/UselessAssignment:
571
602
  Enabled: true
572
603
 
604
+ Lint/UselessConstantScoping:
605
+ Enabled: true
606
+
607
+ Lint/UselessDefaultValueArgument:
608
+ Enabled: true
609
+ AllowedReceivers:
610
+ - 'Rails.cache'
611
+
612
+ Lint/UselessDefined:
613
+ Enabled: true
614
+
573
615
  Lint/UselessElseWithoutRescue:
574
616
  Enabled: true
575
617
 
576
618
  Lint/UselessMethodDefinition:
577
619
  Enabled: true
578
620
 
621
+ Lint/UselessNumericOperation:
622
+ Enabled: true
623
+
624
+ Lint/UselessOr:
625
+ Enabled: true
626
+
579
627
  Lint/UselessRescue:
580
628
  Enabled: true
581
629
 
data/config/naming.yml CHANGED
@@ -191,7 +191,11 @@ Naming/MethodParameterName:
191
191
  # Forbidden names that will register an offense
192
192
  ForbiddenNames: [ ]
193
193
 
194
- Naming/PredicateName:
194
+ Naming/PredicateMethod:
195
+ Enabled: true
196
+ Mode: aggresive
197
+
198
+ Naming/PredicatePrefix:
195
199
  Enabled: true
196
200
  # Predicate name prefixes.
197
201
  NamePrefix:
@@ -119,6 +119,9 @@ Performance/StartWith:
119
119
  Enabled: true
120
120
  SafeMultiline: false
121
121
 
122
+ Performance/StringBytesize:
123
+ Enabled: true
124
+
122
125
  Performance/StringIdentifierArgument:
123
126
  Enabled: true
124
127
 
@@ -134,3 +137,6 @@ Performance/Sum:
134
137
 
135
138
  Performance/TimesMap:
136
139
  Enabled: true
140
+
141
+ Performance/ZipWithoutBlock:
142
+ Enabled: true
data/config/rubocop.yml CHANGED
@@ -11,6 +11,7 @@ inherit_from:
11
11
  - ./performance.yml
12
12
  - ./security.yml
13
13
  - ./style.yml
14
+ - ./thread_safety.yml
14
15
 
15
16
  inherit_mode:
16
17
  merge:
data/config/style.yml CHANGED
@@ -23,6 +23,9 @@ Style/Alias:
23
23
  - prefer_alias
24
24
  - prefer_alias_method
25
25
 
26
+ Style/AmbiguousEndlessMethodDefinition:
27
+ Enabled: true
28
+
26
29
  Style/AndOr:
27
30
  Enabled: true
28
31
  # Whether `and` and `or` are banned only in conditionals (conditionals)
@@ -75,6 +78,9 @@ Style/BeginBlock:
75
78
  Style/BisectedAttrAccessor:
76
79
  Enabled: true
77
80
 
81
+ Style/BitwisePredicate:
82
+ Enabled: true
83
+
78
84
  Style/BlockComments:
79
85
  Enabled: true
80
86
 
@@ -295,6 +301,9 @@ Style/ColonMethodCall:
295
301
  Style/ColonMethodDefinition:
296
302
  Enabled: true
297
303
 
304
+ Style/CombinableDefined:
305
+ Enabled: true
306
+
298
307
  Style/CombinableLoops:
299
308
  Enabled: true
300
309
 
@@ -327,6 +336,9 @@ Style/CommentAnnotation:
327
336
  Style/CommentedKeyword:
328
337
  Enabled: true
329
338
 
339
+ Style/ComparableBetween:
340
+ Enabled: true
341
+
330
342
  Style/ComparableClamp:
331
343
  Enabled: true
332
344
 
@@ -385,6 +397,9 @@ Style/DateTime:
385
397
  Style/DefWithParentheses:
386
398
  Enabled: true
387
399
 
400
+ Style/DigChain:
401
+ Enabled: true
402
+
388
403
  Style/Dir:
389
404
  Enabled: true
390
405
 
@@ -467,6 +482,10 @@ Style/EmptyMethod:
467
482
  - compact
468
483
  - expanded
469
484
 
485
+ Style/EmptyStringInsideInterpolation:
486
+ Enabled: true
487
+ EnforcedStyle: trailing_conditional
488
+
470
489
  Style/Encoding:
471
490
  Enabled: true
472
491
 
@@ -515,9 +534,15 @@ Style/FetchEnvVar:
515
534
  Style/FileEmpty:
516
535
  Enabled: true
517
536
 
537
+ Style/FileNull:
538
+ Enabled: true
539
+
518
540
  Style/FileRead:
519
541
  Enabled: true
520
542
 
543
+ Style/FileTouch:
544
+ Enabled: true
545
+
521
546
  Style/FileWrite:
522
547
  Enabled: true
523
548
 
@@ -614,12 +639,18 @@ Style/HashEachMethods:
614
639
  Style/HashExcept:
615
640
  Enabled: true
616
641
 
642
+ Style/HashFetchChain:
643
+ Enabled: true
644
+
617
645
  Style/HashLikeCase:
618
646
  Enabled: true
619
647
  # `MinBranchesCount` defines the number of branches `case` needs to have
620
648
  # to trigger this cop
621
649
  MinBranchesCount: 3
622
650
 
651
+ Style/HashSlice:
652
+ Enabled: true
653
+
623
654
  Style/HashSyntax:
624
655
  Enabled: true
625
656
  EnforcedStyle: ruby19_no_mixed_keys
@@ -745,6 +776,17 @@ Style/IpAddresses:
745
776
  - '**/Gemfile'
746
777
  - '**/gems.rb'
747
778
  - '**/*.gemspec'
779
+ - '**/rack_attack.rb'
780
+
781
+ Style/ItAssignment:
782
+ Enabled: <%= ENV['RUBY_MAJOR'].to_f >= 3.4 %>
783
+
784
+ Style/ItBlockParameter:
785
+ Enabled: true
786
+ EnforcedStyle: disallow
787
+
788
+ Style/KeywordArgumentsMergin:
789
+ Enabled: true
748
790
 
749
791
  Style/KeywordParametersOrder:
750
792
  Enabled: true
@@ -1173,6 +1215,9 @@ Style/RedundantArgument:
1173
1215
  Style/RedundantArrayConstructor:
1174
1216
  Enabled: true
1175
1217
 
1218
+ Style/RedundantArrayFlatten:
1219
+ Enabled: true
1220
+
1176
1221
  Style/RedundantAssignment:
1177
1222
  Enabled: true
1178
1223
 
@@ -1216,6 +1261,9 @@ Style/RedundantFileExtensionInRequire:
1216
1261
  Style/RedundantFilterChain:
1217
1262
  Enabled: true
1218
1263
 
1264
+ Style/RedundantFormat:
1265
+ Enabled: true
1266
+
1219
1267
  Style/RedundantFreeze:
1220
1268
  Enabled: true
1221
1269
 
@@ -1229,6 +1277,9 @@ Style/RedundantInitialize:
1229
1277
  Style/RedundantInterpolation:
1230
1278
  Enabled: true
1231
1279
 
1280
+ Style/RedundantInterpolationUnfreeze:
1281
+ Enabled: <%= ENV['RUBY_MAJOR'].to_i >= 3 %>
1282
+
1232
1283
  Style/RedundantLineContinuation:
1233
1284
  Enabled: true
1234
1285
 
@@ -1328,6 +1379,9 @@ Style/SafeNavigation:
1328
1379
  # Maximum length of method chains for register an offense.
1329
1380
  MaxChainLength: 2
1330
1381
 
1382
+ Style/SafeNavigationChainLength:
1383
+ Enabled: false
1384
+
1331
1385
  Style/Sample:
1332
1386
  Enabled: true
1333
1387
 
@@ -0,0 +1,27 @@
1
+ plugins: rubocop-thread_safety
2
+
3
+ ThreadSafety/ClassAndModuleAttributes:
4
+ Enabled: true
5
+
6
+ ThreadSafety/ClassInstanceVariable:
7
+ Enabled: true
8
+
9
+ ThreadSafety/DirChdir:
10
+ Enabled: true
11
+ AllowCallWithBlock: true
12
+
13
+ ThreadSafety/MutableClassInstanceVariable:
14
+ Enabled: true
15
+ EnforcedStyle: strict
16
+
17
+ ThreadSafety/NewThread:
18
+ Enabled: true
19
+
20
+ ThreadSafety/RackMiddlewareInstanceVariable:
21
+ Enabled: true
22
+ Include:
23
+ - app/middleware/**/*.rb
24
+ - lib/middleware/**/*.rb
25
+ - app/middlewares/**/*.rb
26
+ - lib/middlewares/**/*.rb
27
+ AllowedIdentifiers: [ ]
@@ -8,7 +8,7 @@ module RuboCop
8
8
  TINY = 0
9
9
 
10
10
  # Set PRE to nil unless it's a pre-release (beta, rc, etc.)
11
- PRE = 'rc.pre.1'
11
+ PRE = 'rc.pre.3'
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.').freeze
14
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rubomatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.rc.pre.1
4
+ version: 1.6.0.rc.pre.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
@@ -44,6 +44,20 @@ dependencies:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.76.1
47
+ - !ruby/object:Gem::Dependency
48
+ name: rubocop-packaging
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.6.0
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '='
59
+ - !ruby/object:Gem::Version
60
+ version: 0.6.0
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: rubocop-performance
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -58,6 +72,20 @@ dependencies:
58
72
  - - "~>"
59
73
  - !ruby/object:Gem::Version
60
74
  version: 1.25.0
75
+ - !ruby/object:Gem::Dependency
76
+ name: rubocop-thread_safety
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - '='
80
+ - !ruby/object:Gem::Version
81
+ version: 0.7.2
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - '='
87
+ - !ruby/object:Gem::Version
88
+ version: 0.7.2
61
89
  description:
62
90
  email:
63
91
  - documents@brandsinsurance.com
@@ -84,6 +112,7 @@ files:
84
112
  - config/rubomatic/style.yml
85
113
  - config/security.yml
86
114
  - config/style.yml
115
+ - config/thread_safety.yml
87
116
  - docs/cops/layout/README.adoc
88
117
  - docs/cops/layout/multiline_array_line_breaks/README.adoc
89
118
  - docs/cops/style/README.adoc