nxt_cop 1.3.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +4 -3
- data/default.yml +363 -1
- data/lib/nxt_cop/version.rb +1 -1
- data/nxt_cop.gemspec +4 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eb597d25eddcad36a8b678d16aec8012a29e0b9c33a145fc7e528303cf1ea27
|
4
|
+
data.tar.gz: dfa1494d7e788cf1500f030938995d8e5a53a74cee29d3b1fc726687dc7cab85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d2923f5964870f8e7262c19476874f01e1785ddbba09ce158909f3cbf0758f7857de4df85586372abb669686d79cbf74f49d74500a4566e457b4eecca830583
|
7
|
+
data.tar.gz: 5e7efb90fc058ffc9b7c02a6aa948fcd0b20cf50c3b274998dbcc0ca5acc7c268c950afa97031073202747b009c4e520a1b400a1f60d2110f9479c340298acba
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nxt_cop (
|
4
|
+
nxt_cop (2.0.0)
|
5
5
|
rubocop (~> 1.57.2)
|
6
6
|
rubocop-rails (~> 2.8)
|
7
7
|
rubocop-rspec (~> 2.12)
|
@@ -9,7 +9,7 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (7.1.
|
12
|
+
activesupport (7.1.2)
|
13
13
|
base64
|
14
14
|
bigdecimal
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -59,10 +59,11 @@ GEM
|
|
59
59
|
rubocop (~> 1.41)
|
60
60
|
rubocop-factory_bot (2.24.0)
|
61
61
|
rubocop (~> 1.33)
|
62
|
-
rubocop-rails (2.22.
|
62
|
+
rubocop-rails (2.22.2)
|
63
63
|
activesupport (>= 4.2.0)
|
64
64
|
rack (>= 1.1)
|
65
65
|
rubocop (>= 1.33.0, < 2.0)
|
66
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
66
67
|
rubocop-rspec (2.25.0)
|
67
68
|
rubocop (~> 1.40)
|
68
69
|
rubocop-capybara (~> 2.17)
|
data/default.yml
CHANGED
@@ -18,7 +18,8 @@ AllCops:
|
|
18
18
|
- db/migrate/*
|
19
19
|
- vendor/**/*
|
20
20
|
- node_modules/**/*
|
21
|
-
DisabledByDefault:
|
21
|
+
DisabledByDefault: false
|
22
|
+
NewCops: disable # to avoid warnings. TODO: remove this setting and add new cops from the warning.
|
22
23
|
|
23
24
|
# A bunch of these layout cops are enabled by default,
|
24
25
|
# but for some reason 'DisableByDefault' is set to 'true' above.
|
@@ -260,3 +261,364 @@ Lint/MixedCaseRange:
|
|
260
261
|
Enabled: true
|
261
262
|
Lint/RedundantRegexpQuantifiers:
|
262
263
|
Enabled: true
|
264
|
+
|
265
|
+
# This is default cops we want to keep disabled:
|
266
|
+
Style/FrozenStringLiteralComment:
|
267
|
+
Enabled: false
|
268
|
+
Layout/LineLength:
|
269
|
+
Enabled: false
|
270
|
+
Style/ArgumentsForwarding:
|
271
|
+
Enabled: false
|
272
|
+
Naming/BlockForwarding:
|
273
|
+
Enabled: false
|
274
|
+
Rails/FreezeTime:
|
275
|
+
Enabled: false
|
276
|
+
Style/Documentation:
|
277
|
+
Enabled: false
|
278
|
+
Metrics/MethodLength:
|
279
|
+
Enabled: false
|
280
|
+
Naming/VariableNumber:
|
281
|
+
Enabled: false
|
282
|
+
Metrics/AbcSize:
|
283
|
+
Enabled: false
|
284
|
+
Metrics/ClassLength:
|
285
|
+
Enabled: false
|
286
|
+
Style/ClassAndModuleChildren:
|
287
|
+
Enabled: false
|
288
|
+
Metrics/BlockLength:
|
289
|
+
Enabled: false
|
290
|
+
Metrics/CyclomaticComplexity:
|
291
|
+
Enabled: false
|
292
|
+
Style/SafeNavigation:
|
293
|
+
Enabled: false
|
294
|
+
Rails/Output:
|
295
|
+
Enabled: false
|
296
|
+
Style/Next: # this one looks dangerous
|
297
|
+
Enabled: false
|
298
|
+
Bundler/OrderedGems:
|
299
|
+
Enabled: false
|
300
|
+
Bundler/DuplicatedGroup:
|
301
|
+
Enabled: false
|
302
|
+
Rails/HttpStatus:
|
303
|
+
Enabled: false
|
304
|
+
Rails/SkipsModelValidations:
|
305
|
+
Enabled: false
|
306
|
+
Style/InfiniteLoop:
|
307
|
+
Enabled: false
|
308
|
+
Style/StderrPuts:
|
309
|
+
Enabled: false
|
310
|
+
Style/NumericPredicate:
|
311
|
+
Enabled: false
|
312
|
+
Metrics/PerceivedComplexity:
|
313
|
+
Enabled: false
|
314
|
+
Style/RegexpLiteral:
|
315
|
+
Enabled: false
|
316
|
+
Rails/Delegate:
|
317
|
+
Enabled: false
|
318
|
+
Style/RaiseArgs:
|
319
|
+
Enabled: false
|
320
|
+
Rails/HasManyOrHasOneDependent: # Nice to have but challenging to fix
|
321
|
+
Enabled: false
|
322
|
+
Rails/InverseOf:
|
323
|
+
Enabled: false
|
324
|
+
Style/MultilineBlockChain:
|
325
|
+
Enabled: false
|
326
|
+
Naming/AccessorMethodName:
|
327
|
+
Enabled: false
|
328
|
+
Naming/PredicateName:
|
329
|
+
Enabled: false
|
330
|
+
Style/FormatStringToken:
|
331
|
+
Enabled: false
|
332
|
+
Style/RedundantSort: # dangerous since autofix breaks the code
|
333
|
+
Enabled: false
|
334
|
+
Style/SymbolProc:
|
335
|
+
Enabled: false
|
336
|
+
Rails/ApplicationController:
|
337
|
+
Enabled: false
|
338
|
+
Rails/ApplicationRecord:
|
339
|
+
Enabled: false
|
340
|
+
Style/ExplicitBlockArgument:
|
341
|
+
Enabled: false
|
342
|
+
Rails/DynamicFindBy:
|
343
|
+
Enabled: false
|
344
|
+
Metrics/ParameterLists:
|
345
|
+
Enabled: false
|
346
|
+
Rails/IndexWith:
|
347
|
+
Enabled: false
|
348
|
+
Style/FormatString:
|
349
|
+
Enabled: false
|
350
|
+
Rails/Blank:
|
351
|
+
Enabled: false
|
352
|
+
Rails/Present:
|
353
|
+
Enabled: false
|
354
|
+
Style/NumericLiterals:
|
355
|
+
Enabled: false
|
356
|
+
Style/Lambda:
|
357
|
+
Enabled: false
|
358
|
+
Style/Proc:
|
359
|
+
Enabled: false
|
360
|
+
Style/ExponentialNotation:
|
361
|
+
Enabled: false
|
362
|
+
Style/PreferredHashMethods: # can be changed via vote
|
363
|
+
Enabled: false
|
364
|
+
Rails/Presence:
|
365
|
+
Enabled: false
|
366
|
+
Metrics/ModuleLength:
|
367
|
+
Enabled: false
|
368
|
+
Style/RedundantConditional:
|
369
|
+
Enabled: false
|
370
|
+
Style/TrailingUnderscoreVariable:
|
371
|
+
Enabled: false
|
372
|
+
Style/ParenthesesAroundCondition:
|
373
|
+
Enabled: false
|
374
|
+
Style/HashEachMethods:
|
375
|
+
Enabled: false
|
376
|
+
Style/RedundantAssignment:
|
377
|
+
Enabled: false
|
378
|
+
Style/CaseLikeIf:
|
379
|
+
Enabled: false
|
380
|
+
Style/RedundantBegin:
|
381
|
+
Enabled: false
|
382
|
+
Rails/FilePath:
|
383
|
+
Enabled: false
|
384
|
+
Style/Alias:
|
385
|
+
Enabled: false
|
386
|
+
Style/SingleArgumentDig:
|
387
|
+
Enabled: false
|
388
|
+
Style/RescueModifier: # because it's heavily used in application service
|
389
|
+
Enabled: false
|
390
|
+
Style/IfUnlessModifier:
|
391
|
+
Enabled: false
|
392
|
+
Naming/BinaryOperatorParameterName:
|
393
|
+
Enabled: false
|
394
|
+
Style/SignalException:
|
395
|
+
Enabled: false
|
396
|
+
Style/TrivialAccessors:
|
397
|
+
Enabled: false
|
398
|
+
Rails/HasAndBelongsToMany:
|
399
|
+
Enabled: false
|
400
|
+
Style/AccessModifierDeclarations:
|
401
|
+
Enabled: false
|
402
|
+
Rails/ReadWriteAttribute:
|
403
|
+
Enabled: false
|
404
|
+
Rails/RedundantReceiverInWithOptions:
|
405
|
+
Enabled: false
|
406
|
+
Style/HashTransformValues:
|
407
|
+
Enabled: false
|
408
|
+
Rails/IndexBy:
|
409
|
+
Enabled: false
|
410
|
+
Rails/Pick:
|
411
|
+
Enabled: false
|
412
|
+
Style/CombinableLoops: # hard to autocorrect properly
|
413
|
+
Enabled: false
|
414
|
+
FactoryBot/CreateList:
|
415
|
+
Enabled: false
|
416
|
+
Rails/ReflectionClassName:
|
417
|
+
Enabled: false
|
418
|
+
Style/RedundantSelf:
|
419
|
+
Enabled: false
|
420
|
+
Style/GuardClause:
|
421
|
+
Enabled: false
|
422
|
+
Style/PercentLiteralDelimiters:
|
423
|
+
Enabled: false
|
424
|
+
Style/StringConcatenation: # heavily used in insurance service
|
425
|
+
Enabled: false
|
426
|
+
Style/InverseMethods:
|
427
|
+
Enabled: false
|
428
|
+
Style/RedundantInterpolation:
|
429
|
+
Enabled: false
|
430
|
+
Style/ZeroLengthPredicate:
|
431
|
+
Enabled: false
|
432
|
+
|
433
|
+
# 🤔 Should we enable these cops or not? They look useful but require alignment within the team
|
434
|
+
Style/OpenStructUse:
|
435
|
+
Enabled: false
|
436
|
+
Style/RedundantConstantBase: # new in 1.40
|
437
|
+
Enabled: false
|
438
|
+
Naming/MemoizedInstanceVariableName:
|
439
|
+
Enabled: false
|
440
|
+
Style/ConditionalAssignment:
|
441
|
+
Enabled: false
|
442
|
+
Style/BlockDelimiters:
|
443
|
+
Enabled: false
|
444
|
+
Style/TrailingCommaInArrayLiteral:
|
445
|
+
Enabled: false
|
446
|
+
FactoryBot/FactoryClassName:
|
447
|
+
Enabled: false
|
448
|
+
Style/NumericLiteralPrefix:
|
449
|
+
Enabled: false
|
450
|
+
Style/OptionalBooleanParameter:
|
451
|
+
Enabled: false
|
452
|
+
Style/IdenticalConditionalBranches: # Is it safe to auto-fix?
|
453
|
+
Enabled: false
|
454
|
+
Naming/RescuedExceptionsVariableName: # Would be nice to have, but should align on the name first
|
455
|
+
Enabled: false
|
456
|
+
|
457
|
+
Naming/MethodParameterName: # should enable but we have to manually fix this
|
458
|
+
Enabled: false
|
459
|
+
Rails/UniqueValidationWithoutIndex: # definitely enable!!!
|
460
|
+
Enabled: false
|
461
|
+
Rails/Validation: # discuss with the team
|
462
|
+
Enabled: false
|
463
|
+
Rails/LexicallyScopedActionFilter: # enable and manually disable offences
|
464
|
+
Enabled: false
|
465
|
+
Security/Open:
|
466
|
+
Enabled: false
|
467
|
+
Naming/FileName:
|
468
|
+
Enabled: false
|
469
|
+
Style/EmptyElse:
|
470
|
+
Enabled: false
|
471
|
+
Style/MixinUsage: # Enable and then manually disable offenses?
|
472
|
+
Enabled: false
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
# ✅ Enabled in 2.0 version (activated by "enable all rules by default')
|
477
|
+
# Let's keep commented list here for visibility for a while
|
478
|
+
#
|
479
|
+
#Layout/SpaceInsideParens:
|
480
|
+
# Enabled: false
|
481
|
+
#Layout/SpaceBeforeFirstArg:
|
482
|
+
# Enabled: false
|
483
|
+
#Layout/ExtraSpacing:
|
484
|
+
# Enabled: false
|
485
|
+
#Layout/SpaceAfterColon:
|
486
|
+
# Enabled: false
|
487
|
+
#Rails/PluralizationGrammar:
|
488
|
+
# Enabled: false
|
489
|
+
#Layout/SpaceAroundMethodCallOperator:
|
490
|
+
# Enabled: false
|
491
|
+
#Style/RedundantFreeze:
|
492
|
+
# Enabled: false
|
493
|
+
#Layout/SpaceInLambdaLiteral:
|
494
|
+
# Enabled: false
|
495
|
+
#Layout/LeadingCommentSpace:
|
496
|
+
# Enabled: false
|
497
|
+
#Layout/DefEndAlignment:
|
498
|
+
# Enabled: false
|
499
|
+
#Style/RedundantRegexpEscape:
|
500
|
+
# Enabled: false
|
501
|
+
#Layout/HeredocIndentation:
|
502
|
+
# Enabled: false
|
503
|
+
#Layout/ClosingHeredocIndentation:
|
504
|
+
# Enabled: false
|
505
|
+
#Layout/LeadingEmptyLines:
|
506
|
+
# Enabled: false
|
507
|
+
#Layout/EmptyLinesAroundAccessModifier:
|
508
|
+
# Enabled: false
|
509
|
+
#Style/NegatedIf:
|
510
|
+
# Enabled: false
|
511
|
+
#Style/CommentAnnotation:
|
512
|
+
# Enabled: false
|
513
|
+
#Layout/MultilineOperationIndentation:
|
514
|
+
# Enabled: false
|
515
|
+
#Style/ExpandPathArguments:
|
516
|
+
# Enabled: false
|
517
|
+
#Layout/EmptyLinesAroundMethodBody:
|
518
|
+
# Enabled: false
|
519
|
+
#Style/RedundantReturn:
|
520
|
+
# Enabled: false
|
521
|
+
#Style/GlobalStdStream:
|
522
|
+
# Enabled: false
|
523
|
+
#Style/FloatDivision:
|
524
|
+
# Enabled: false
|
525
|
+
#Style/RescueStandardError:
|
526
|
+
# Enabled: false
|
527
|
+
#Style/NilComparison:
|
528
|
+
# Enabled: false
|
529
|
+
#Style/RedundantFetchBlock:
|
530
|
+
# Enabled: false
|
531
|
+
#Style/Encoding:
|
532
|
+
# Enabled: false
|
533
|
+
#Style/EmptyLiteral:
|
534
|
+
# Enabled: false
|
535
|
+
#Layout/SpaceInsideReferenceBrackets:
|
536
|
+
# Enabled: false
|
537
|
+
#Style/EmptyLambdaParameter:
|
538
|
+
# Enabled: false
|
539
|
+
#Style/TernaryParentheses:
|
540
|
+
# Enabled: false
|
541
|
+
#Naming/MethodName:
|
542
|
+
# Enabled: false
|
543
|
+
#Style/SlicingWithRange:
|
544
|
+
# Enabled: false
|
545
|
+
#Style/EmptyCaseCondition:
|
546
|
+
# Enabled: false
|
547
|
+
#Style/SoleNestedConditional:
|
548
|
+
# Enabled: false
|
549
|
+
#Rails/FindEach:
|
550
|
+
# Enabled: false
|
551
|
+
#Style/RedundantFileExtensionInRequire:
|
552
|
+
# Enabled: false
|
553
|
+
#Layout/SpaceInsideArrayLiteralBrackets:
|
554
|
+
# Enabled: false
|
555
|
+
#Style/HashAsLastArrayItem:
|
556
|
+
# Enabled: false
|
557
|
+
#Lint/RedundantCopDisableDirective:
|
558
|
+
# Enabled: false
|
559
|
+
#Layout/SpaceAroundKeyword:
|
560
|
+
# Enabled: false
|
561
|
+
#Style/KeywordParametersOrder:
|
562
|
+
# Enabled: false
|
563
|
+
#Style/BlockComments:
|
564
|
+
# Enabled: false
|
565
|
+
#Style/AndOr:
|
566
|
+
# Enabled: false
|
567
|
+
#Style/EachWithObject:
|
568
|
+
# Enabled: false
|
569
|
+
#Layout/SpaceAroundBlockParameters:
|
570
|
+
# Enabled: false
|
571
|
+
#Style/MultilineTernaryOperator:
|
572
|
+
# Enabled: false
|
573
|
+
#Style/RedundantParentheses:
|
574
|
+
# Enabled: false
|
575
|
+
#Security/JSONLoad:
|
576
|
+
# Enabled: false
|
577
|
+
#Style/MethodCallWithoutArgsParentheses:
|
578
|
+
# Enabled: false
|
579
|
+
#Style/CommentedKeyword:
|
580
|
+
# Enabled: false
|
581
|
+
#Style/MultilineIfModifier:
|
582
|
+
# Enabled: false
|
583
|
+
#Style/IfInsideElse:
|
584
|
+
# Enabled: false
|
585
|
+
#Style/AccessorGrouping:
|
586
|
+
# Enabled: false
|
587
|
+
#Layout/BlockEndNewline:
|
588
|
+
# Enabled: false
|
589
|
+
#Rails/RedundantForeignKey:
|
590
|
+
# Enabled: false
|
591
|
+
#Style/UnlessElse:
|
592
|
+
# Enabled: false
|
593
|
+
#Layout/EmptyLinesAroundModuleBody:
|
594
|
+
# Enabled: false
|
595
|
+
#Rails/RakeEnvironment:
|
596
|
+
# Enabled: false
|
597
|
+
#Layout/EmptyLinesAroundArguments:
|
598
|
+
# Enabled: false
|
599
|
+
#Style/EachForSimpleLoop:
|
600
|
+
# Enabled: false
|
601
|
+
#Style/ClassCheck:
|
602
|
+
# Enabled: false
|
603
|
+
#Style/NestedParenthesizedCalls:
|
604
|
+
# Enabled: false
|
605
|
+
#Style/LineEndConcatenation:
|
606
|
+
# Enabled: false
|
607
|
+
#Style/ParallelAssignment:
|
608
|
+
# Enabled: false
|
609
|
+
#Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
610
|
+
# Enabled: false
|
611
|
+
#Layout/SpaceAroundEqualsInParameterDefault:
|
612
|
+
# Enabled: false
|
613
|
+
#Style/YodaCondition:
|
614
|
+
# Enabled: false
|
615
|
+
#Layout/SpaceInsideStringInterpolation:
|
616
|
+
# Enabled: false
|
617
|
+
#Style/EmptyMethod:
|
618
|
+
# Enabled: false
|
619
|
+
#Layout/EmptyLineBetweenDefs:
|
620
|
+
# Enabled: false
|
621
|
+
#Naming/ConstantName:
|
622
|
+
# Enabled: false
|
623
|
+
#Rails/RelativeDateConstant:
|
624
|
+
# Enabled: false
|
data/lib/nxt_cop/version.rb
CHANGED
data/nxt_cop.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
lib = File.expand_path('
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require 'nxt_cop/version'
|
4
4
|
|
@@ -24,13 +24,15 @@ Gem::Specification.new do |spec|
|
|
24
24
|
'public gem pushes.'
|
25
25
|
end
|
26
26
|
|
27
|
-
spec.files
|
27
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
28
28
|
f.match(%r{^(test|spec|features)/})
|
29
29
|
end
|
30
30
|
spec.bindir = 'exe'
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ['lib']
|
33
33
|
|
34
|
+
spec.required_ruby_version = '>= 3.2'
|
35
|
+
|
34
36
|
spec.add_dependency 'rubocop', '~> 1.57.2'
|
35
37
|
spec.add_dependency 'rubocop-rails', '~> 2.8'
|
36
38
|
spec.add_dependency 'rubocop-rspec', '~> 2.12'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nxt_cop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Livingstone
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
117
|
requirements:
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
120
|
+
version: '3.2'
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - ">="
|