simplycop 1.12.21 → 1.12.23

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: 68e568f306249b37bfb255cdd58ec03e209b2f1e0d81be18c8ef015dab756c4d
4
- data.tar.gz: 84681f62a6470b474340dc9ab33310721a2caf41ada7245d2ab17c39e37b9038
3
+ metadata.gz: fbc8fea3a5b127fa08a9d250016fd102b9a846290fef76953b2bf15b980f69f2
4
+ data.tar.gz: ed171ab56435846964f89828447bf366e3a69254b25a85ed973e993e71bda264
5
5
  SHA512:
6
- metadata.gz: f139da031074eb065eb31ecf446da61ce67c4fb33e7286dd601e8a236d44cdf3473e048b20f3936f615236e4a7ac866cfdb614bca263236fc17b33b04072898e
7
- data.tar.gz: 8a02a4aef2f054cec5b66af68d2a922bf6cd0481c6337c51d3aff1de4ca82bbdfb6b0cd978537d639889475aec737e88f2bae86482bbc39b37d05caf7e402a84
6
+ metadata.gz: 43943e46ce61242743dd098df0382c8a19478b85f44bb5508bd6bafe3b9095fbd6479f94c8017f066ea709c657f7aef3031c9ee76e159a5c372df7ee3d3b1e29
7
+ data.tar.gz: f64ea04d619da3c8bedb46d2496bc4c086ea7e8be55ff2a47f497ec2a7c4bae8f49bb7425842d1c9464f3c091c5037656b4fc5369cfecfd0a65c6649edd5a52e
data/.simplycop.yml CHANGED
@@ -21,8 +21,52 @@ 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
24
68
 
25
- Gemspec/DeprecatedAttributeAssignment: # new in 1.30
69
+ Gemspec/RubyVersionGlobalsUsage:
26
70
  Enabled: true
27
71
 
28
72
  Layout/AccessModifierIndentation:
@@ -343,113 +387,552 @@ Lint/AmbiguousBlockAssociation:
343
387
  Exclude:
344
388
  - spec/**/*
345
389
 
390
+ Lint/AmbiguousOperator:
391
+ Enabled: true
392
+
346
393
  Lint/AmbiguousOperatorPrecedence:
347
394
  Enabled: true
348
395
 
349
396
  Lint/AmbiguousRange:
350
397
  Enabled: true
351
398
 
399
+ # TODO: One fail on rater spec then would pass
400
+ # Lint/AmbiguousRegexpLiteral:
401
+ # Enabled: true
402
+
403
+ Lint/AssignmentInCondition:
404
+ Enabled: true
405
+
406
+ Lint/BigDecimalNew:
407
+ Enabled: true
408
+
409
+ Lint/BinaryOperatorWithIdenticalOperands:
410
+ Enabled: true
411
+
412
+ Lint/BooleanSymbol:
413
+ Enabled: true
414
+
415
+ Lint/CircularArgumentReference:
416
+ Enabled: true
417
+
418
+ # TODO: 6 fails in Rater, otherwise clear
419
+ # Lint/ConstantDefinitionInBlock:
420
+ # Enabled: true
421
+
352
422
  Lint/ConstantOverwrittenInRescue: # new in 1.31
353
423
  Enabled: true
354
424
 
425
+ # Set to false as 10000s of fails on Rater and Chopin if enabled
426
+ # Rubocop docs suggest enabling only for constants that may cause concern
427
+ # so enable and set these if required
428
+ Lint/ConstantResolution:
429
+ Enabled: false
430
+
431
+ Lint/Debugger:
432
+ Enabled: true
433
+
434
+ Lint/DeprecatedClassMethods:
435
+ Enabled: true
436
+
355
437
  Lint/DeprecatedConstants:
356
438
  Enabled: true
357
439
 
440
+ Lint/DeprecatedOpenSSLConstant:
441
+ Enabled: true
442
+
443
+ Lint/DisjunctiveAssignmentInConstructor:
444
+ Enabled: true
445
+
358
446
  Lint/DuplicateBranch:
359
447
  Enabled: true
360
448
 
449
+ Lint/DuplicateCaseCondition:
450
+ Enabled: true
451
+
452
+ Lint/DuplicateElsifCondition:
453
+ Enabled: true
454
+
455
+ Lint/DuplicateHashKey:
456
+ Enabled: true
457
+
361
458
  Lint/DuplicateMagicComment:
362
459
  Enabled: true
363
460
 
461
+ Lint/DuplicateMatchPattern:
462
+ Enabled: true
463
+
364
464
  Lint/DuplicateMethods:
365
465
  Enabled: true
366
466
 
367
467
  Lint/DuplicateRegexpCharacterClassElement:
368
468
  Enabled: true
369
469
 
470
+ Lint/DuplicateRequire:
471
+ Enabled: true
472
+
473
+ Lint/DuplicateRescueException:
474
+ Enabled: true
475
+
476
+ Lint/EachWithObjectArgument:
477
+ Enabled: true
478
+
479
+ # TODO: 19 autocorrectable odd else layouts in Rater
480
+ # Lint/ElseLayout:
481
+ # Enabled: true
482
+
370
483
  Lint/EmptyBlock:
371
484
  Enabled: true
372
485
 
373
486
  Lint/EmptyClass:
374
487
  Enabled: true
375
488
 
489
+ Lint/EmptyConditionalBody:
490
+ Enabled: true
491
+
492
+ Lint/EmptyEnsure:
493
+ Enabled: true
494
+
495
+ Lint/EmptyExpression:
496
+ Enabled: true
497
+
498
+ Lint/EmptyFile:
499
+ Enabled: true
500
+
376
501
  Lint/EmptyInPattern: # new in 1.16
502
+ Enabled: true
503
+
504
+ Lint/EmptyInterpolation:
505
+ Enabled: true
506
+
507
+ Lint/EmptyWhen:
377
508
  Enabled: true
378
509
 
510
+ Lint/ErbNewArguments:
511
+ Enabled: true
512
+
513
+ Lint/FlipFlop:
514
+ Enabled: true
515
+
516
+ Lint/FloatComparison:
517
+ Enabled: true
518
+
519
+ Lint/FloatOutOfRange:
520
+ Enabled: true
521
+
522
+ Lint/FormatParameterMismatch:
523
+ Enabled: true
524
+
525
+ Lint/HashCompareByIdentity:
526
+ Enabled: true
527
+
379
528
  Lint/HeredocMethodCallPosition:
380
529
  Enabled: true
381
530
 
531
+ Lint/IdentityComparison:
532
+ Enabled: true
533
+
534
+ Lint/ImplicitStringConcatenation:
535
+ Enabled: true
536
+
382
537
  Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
383
538
  Enabled: true
384
539
 
540
+ # TODO: two fails on Rater, one on CoCo, otherwise fine to enable
541
+ # Lint/IneffectiveAccessModifier:
542
+ # Enabled: true
543
+
544
+ Lint/InheritException:
545
+ Enabled: true
546
+
547
+ Lint/InterpolationCheck:
548
+ Enabled: true
549
+
385
550
  Lint/LambdaWithoutLiteralBlock:
386
551
  Enabled: true
387
552
 
553
+ Lint/LiteralAsCondition:
554
+ Enabled: true
555
+
556
+ Lint/LiteralInInterpolation:
557
+ Enabled: true
558
+
559
+ Lint/Loop:
560
+ Enabled: true
561
+
562
+ Lint/MissingCopEnableDirective:
563
+ Enabled: true
564
+
565
+ # TODO: Handful of errors on Rater and CoCo
566
+ # Lint/MissingSuper:
567
+ # Enabled: true
568
+
569
+ Lint/MixedRegexpCaptureTypes:
570
+ Enabled: true
571
+
572
+ Lint/MultipleComparison:
573
+ Enabled: true
574
+
575
+ Lint/NestedMethodDefinition:
576
+ Enabled: true
577
+
578
+ Lint/NestedPercentLiteral:
579
+ Enabled: true
580
+
581
+ Lint/NextWithoutAccumulator:
582
+ Enabled: true
583
+
388
584
  Lint/NoReturnInBeginEndBlocks:
389
585
  Enabled: true
390
586
 
391
587
  Lint/NonAtomicFileOperation:
392
588
  Enabled: true
393
589
 
590
+ Lint/NonDeterministicRequireOrder:
591
+ Enabled: true
592
+
593
+ Lint/NonLocalExitFromIterator:
594
+ Enabled: true
595
+
596
+ # 100s of fails on Rater and Chopin
597
+ # Lint/NumberConversion:
598
+ # Enabled: true
599
+
394
600
  Lint/NumberedParameterAssignment:
395
601
  Enabled: true
396
602
 
397
603
  Lint/OrAssignmentToConstant:
398
604
  Enabled: true
399
605
 
606
+ Lint/OrderedMagicComments:
607
+ Enabled: true
608
+
609
+ Lint/OutOfRangeRegexpRef:
610
+ Enabled: true
611
+
612
+ Lint/ParenthesesAsGroupedExpression:
613
+ Enabled: true
614
+
615
+ Lint/PercentStringArray:
616
+ Enabled: true
617
+
618
+ Lint/PercentSymbolArray:
619
+ Enabled: true
620
+
621
+ Lint/RaiseException:
622
+ Enabled: true
623
+
624
+ Lint/RandOne:
625
+ Enabled: true
626
+
627
+ # Can't be checked with --only, enable once Rater and Chopin up to date with Simplycop
628
+ # Lint/RedundantCopDisableDirective:
629
+ # Enabled: true
630
+
631
+ # Can't be checked with --only, enable once Rater and Chopin up to date with Simplycop
632
+ # Lint/RedundantCopEnableDirective:
633
+ # Enabled: true
634
+
400
635
  Lint/RedundantDirGlobSort:
401
636
  Enabled: true
402
637
 
638
+ Lint/RedundantRequireStatement:
639
+ Enabled: true
640
+
641
+ Lint/RedundantSafeNavigation:
642
+ Enabled: true
643
+
644
+ Lint/RedundantSplatExpansion:
645
+ Enabled: true
646
+
647
+ Lint/RedundantStringCoercion:
648
+ Enabled: true
649
+
650
+ Lint/RedundantWithIndex:
651
+ Enabled: true
652
+
653
+ Lint/RedundantWithObject:
654
+ Enabled: true
655
+
403
656
  Lint/RefinementImportMethods:
404
657
  Enabled: true
405
658
 
659
+ Lint/RegexpAsCondition:
660
+ Enabled: true
661
+
662
+ Lint/RequireParentheses:
663
+ Enabled: true
664
+
406
665
  Lint/RequireRangeParentheses:
407
666
  Enabled: true
408
667
 
409
668
  Lint/RequireRelativeSelfPath:
410
669
  Enabled: true
411
670
 
671
+ Lint/RescueException:
672
+ Enabled: true
673
+
674
+ Lint/RescueType:
675
+ Enabled: true
676
+
677
+ Lint/ReturnInVoidContext:
678
+ Enabled: true
679
+
680
+ Lint/SafeNavigationChain:
681
+ Enabled: true
682
+
683
+ Lint/SafeNavigationConsistency:
684
+ Enabled: true
685
+
686
+ Lint/SafeNavigationWithEmpty:
687
+ Enabled: true
688
+
689
+ Lint/ScriptPermission:
690
+ Enabled: true
691
+
692
+ Lint/SelfAssignment:
693
+ Enabled: true
694
+
695
+ Lint/SendWithMixinArgument:
696
+ Enabled: true
697
+
698
+ Lint/ShadowedArgument:
699
+ Enabled: true
700
+
701
+ Lint/ShadowedException:
702
+ Enabled: true
703
+
704
+ # To discuss: 63 offences on Chopin, none on Rater, CoCo
705
+ # Lint/ShadowingOuterLocalVariable:
706
+ # Enabled: true
707
+
708
+ Lint/StructNewOverride:
709
+ Enabled: true
710
+
711
+ Lint/SuppressedException:
712
+ Enabled: true
713
+
412
714
  Lint/SymbolConversion:
413
715
  Enabled: true
414
716
 
717
+ Lint/Syntax:
718
+ Enabled: true
719
+
415
720
  Lint/ToEnumArguments:
416
721
  Enabled: true
417
722
 
723
+ Lint/ToJSON:
724
+ Enabled: true
725
+
726
+ Lint/TopLevelReturnWithArgument:
727
+ Enabled: true
728
+
729
+ Lint/TrailingCommaInAttributeDeclaration:
730
+ Enabled: true
731
+
418
732
  Lint/TripleQuotes:
419
733
  Enabled: true
420
734
 
735
+ Lint/UnderscorePrefixedVariableName:
736
+ Enabled: true
737
+
421
738
  Lint/UnexpectedBlockArity:
422
739
  Enabled: true
423
740
 
741
+ Lint/UnifiedInteger:
742
+ Enabled: true
743
+
424
744
  Lint/UnmodifiedReduceAccumulator:
425
745
  Enabled: true
426
746
 
747
+ Lint/UnreachableCode:
748
+ Enabled: true
749
+
750
+ Lint/UnreachableLoop:
751
+ Enabled: true
752
+
753
+ Lint/UnusedBlockArgument:
754
+ Enabled: true
755
+
756
+ Lint/UnusedMethodArgument:
757
+ Enabled: true
758
+
759
+ Lint/UriEscapeUnescape:
760
+ Enabled: true
761
+
762
+ Lint/UriRegexp:
763
+ Enabled: true
764
+
765
+ Lint/UselessAccessModifier:
766
+ Enabled: true
767
+
768
+ Lint/UselessAssignment:
769
+ Enabled: true
770
+
771
+ Lint/UselessElseWithoutRescue:
772
+ Enabled: true
773
+
774
+ Lint/UselessMethodDefinition:
775
+ Enabled: true
776
+
777
+ # TODO: Single fail on Chopin
778
+ # Lint/UselessRescue:
779
+ # Enabled: true
780
+
427
781
  Lint/UselessRuby2Keywords:
428
782
  Enabled: true
429
783
 
784
+ Lint/UselessSetterCall:
785
+ Enabled: true
786
+
787
+ Lint/UselessTimes:
788
+ Enabled: true
789
+
790
+ Lint/Void:
791
+ Enabled: true
792
+
793
+ # To discuss. Suggest enabling with suitable max and progressively lower.
794
+ # Chopin currently set at 91. Couldn't be lowered much. 671 fails at default of 17.
795
+ # Rater currently set at 83. Looks like it could be lowered to c. 40. 111 fails at default of 17.
796
+ # 54 fails in CoCo
797
+ # Metrics/AbcSize:
798
+ # Max: tbc
799
+
800
+ # To discuss. Keep current exclusion as below but decide on suitable max. Still currently needs many overrides.
801
+ # At default of 25, 269 fails on Chopin, 10584 on Rater, 18 on CoCo.
430
802
  Metrics/BlockLength:
431
803
  Exclude:
432
804
  - spec/**/*.rb
433
805
 
806
+ Metrics/BlockNesting:
807
+ Enabled: true
808
+
809
+ # To discuss: set new max? Chopin has one class - rfq - at 554. Exclude and set lower max for elsewhere?
810
+ # CoCo 8 fails at > 100. Max 225. Rater OK
434
811
  Metrics/ClassLength:
435
812
  Max: 512
436
813
 
814
+ Metrics/CollectionLiteralLength:
815
+ Enabled: true
816
+
817
+ # Chopin 31 fails at > 7. Max 18.
818
+ # Rater 11 at > 7. Max 21
819
+ # CoCo 9 at > 7. Max 13
820
+ # Set at 21 to prevent further growth. Discuss setting lower.
821
+ Metrics/CyclomaticComplexity:
822
+ Max: 21
823
+
824
+ # To discuss. Chopin 1541 fails at > 10, max 118; Rater 330, max 25 with exclusions; CoCo 87, max 51
825
+ # Metrics/MethodLength:
826
+ # Max: tbc
827
+
828
+ # To discuss. Chopin 22 fails at > 100, max 1521; Rater 31, max 370; CoCo 2, max 160
829
+ # Metrics/ModuleLength:
830
+ # Max: tbc
831
+
437
832
  Metrics/ParameterLists:
438
833
  CountKeywordArgs: false
439
834
  Enabled: true
440
835
 
441
- Naming/BlockForwarding: # new in 1.24
836
+ # Chopin 15 fails at > 8. Max 19.
837
+ # Rater 9 at > 8. Max 21
838
+ # CoCo 5 at > 8. Max 13
839
+ # Set at 21 to prevent further growth. Discuss setting lower.
840
+ Metrics/PerceivedComplexity:
841
+ Max: 21
842
+
843
+ Migration/DepartmentName:
844
+ Enabled: true
845
+
846
+ # Suggest true but causes 17 fails in Chopin, 6 in Rater, 2 in CoCo
847
+ # Naming/AccessorMethodName:
848
+ # Enabled: true
849
+
850
+ Naming/AsciiIdentifiers:
851
+ Enabled: true
852
+
853
+ Naming/BinaryOperatorParameterName:
854
+ Enabled: true
855
+
856
+ Naming/BlockForwarding:
857
+ Enabled: true
858
+
859
+ Naming/BlockParameterName:
860
+ Enabled: true
861
+
862
+ Naming/ClassAndModuleCamelCase:
863
+ Enabled: true
864
+
865
+ Naming/ConstantName:
866
+ Enabled: true
867
+
868
+ Naming/FileName:
869
+ Enabled: true
870
+
871
+ Naming/HeredocDelimiterCase:
872
+ Enabled: true
873
+
874
+ Naming/HeredocDelimiterNaming:
442
875
  Enabled: true
443
876
 
444
877
  Naming/InclusiveLanguage:
445
878
  Enabled: true
446
879
 
880
+ # To discuss: suggest true but 86 fails on Chopin
881
+ # Naming/MemoizedInstanceVariableName:
882
+ # Enabled: true
883
+
884
+ Naming/MethodName:
885
+ Enabled: true
886
+
887
+ # To discuss: suggest true with possible allowed exceptions as below (10 fails on Chopin, exceptions would allow 4)
888
+ # Naming/MethodParameterName:
889
+ # Enabled: true
890
+ # AllowedNames:
891
+ # - e
892
+ # - ex
893
+ # - n
894
+
895
+ # To discuss: suggest true but 52 fails in Chopin, 8 in Coco (consider with Naming/AccessorName)
896
+ # Naming/PredicateName:
897
+ # Enabled: true
898
+
899
+ # To discuss: Should decide on a style. Default e instead of err causes 47 fails on Chopin, none on Rater, CoCo
900
+ # Naming/RescuedExceptionsVariableName:
901
+ # Enabled: true
902
+
903
+ Naming/VariableName:
904
+ Enabled: true
905
+
906
+ # To discuss: suggest enforce snake_case as this seems to be the preferred style
907
+ # Default normalcase causes
908
+ # Naming/VariableNumber:
909
+ # Enabled: true
910
+ # EnforcedStyle: snake_case
911
+
447
912
  Security/CompoundHash:
448
913
  Enabled: true
449
914
 
915
+ # Should probably be set to true but 13 offences in chopin spec
916
+ # Security/Eval:
917
+ # Enabled: true
918
+
450
919
  Security/IoMethods:
451
920
  Enabled: true
452
921
 
922
+ # Should probably be set to true but 18 offences in chopin spec
923
+ # Security/JSONLoad:
924
+ # Enabled: true
925
+
926
+ Security/MarshalLoad:
927
+ Enabled: true
928
+
929
+ Security/Open:
930
+ Enabled: true
931
+
932
+ # Two fails on ContinuousCover, others fine
933
+ # Security/YAMLLoad:
934
+ # Enabled: true
935
+
453
936
  Style/AccessModifierDeclarations:
454
937
  Enabled: false
455
938
 
@@ -7,5 +7,5 @@
7
7
  #
8
8
 
9
9
  module Simplycop
10
- VERSION = '1.12.21'
10
+ VERSION = '1.12.23'
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.21
4
+ version: 1.12.23
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-23 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop