arcadia_cops 3.5.3 → 4.0.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/config/config.yml +3 -4
  3. data/config/enabled.yml +27 -39
  4. metadata +27 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a307ceaf1d85dbfb6fdc61340ac7a377c1ccce6f425dce4638b430c4deea5577
4
- data.tar.gz: 10596c1b66bc0a161d2d36472800919baa0eff4f3ce2125a8ff2193202cfb234
3
+ metadata.gz: 6651da173543ee1ffb9d8e31b0dfda75c35ef5454f9d1ff054160ae5d621041a
4
+ data.tar.gz: d7e2497155d064da862d66b65a1163f5abe01ef1a0afee89df5e879ac46ea281
5
5
  SHA512:
6
- metadata.gz: 9c96aab67cfbd5b4200e56234bad254b63487a53520000be9f21905f83e2df33a25ce31b7c8364bdc256a2be314dc803f48b2dcb1e897367d08b20239f5a90b3
7
- data.tar.gz: 2a9ec0ad89dbc322c8014cc861889fa03d1a5ed680aef2933e903d724b34c39c94bcd6b2ef7cea4c879f4500864588a32fa807eaf1526f2152e58983458f5b47
6
+ metadata.gz: dc99132ea7385e8d1e9cd2943b130fd2736dfef8f6a024b8b341fc4748ee519588f290c8af65c5806ef8460427d72ba21a4532a97bc9b36a54f7db12cb1cef59
7
+ data.tar.gz: '03087562410c086336d1d94f59431675a5b10bef7ad631acd27857e63eb15653c0bbc1fd5357a34f1d9e380f578c11ccee7963a650eb6b10f341a2a48356006f'
data/config/config.yml CHANGED
@@ -1,7 +1,9 @@
1
1
  # This is the default configuration file. Enabling and disabling is configured
2
2
  # in separate files. This file adds all other parameters apart from Enabled.
3
3
 
4
- require: rubocop-rspec
4
+ require:
5
+ - rubocop-rails
6
+ - rubocop-rspec
5
7
 
6
8
  # Common configuration.
7
9
  AllCops:
@@ -71,6 +73,3 @@ AllCops:
71
73
  # Else if .ruby-version exists and it contains an MRI version it is used.
72
74
  # Otherwise we fallback to the oldest officially supported Ruby version (2.1).
73
75
  # TargetRubyVersion: 2.5 # SPECIFY IN PROJECT .ruby-version file
74
-
75
- Rails:
76
- Enabled: false
data/config/enabled.yml CHANGED
@@ -6,18 +6,18 @@ Layout/AccessModifierIndentation:
6
6
  Description: Check indentation of private/protected visibility modifiers.
7
7
  StyleGuide: '#indent-public-private-protected'
8
8
 
9
- Layout/AlignArray:
9
+ Layout/ArrayAlignment:
10
10
  Description: >-
11
11
  Align the elements of an array literal if they span more than
12
12
  one line.
13
13
  StyleGuide: '#align-multiline-arrays'
14
14
 
15
- Layout/AlignHash:
15
+ Layout/HashAlignment:
16
16
  Description: >-
17
17
  Align the elements of a hash literal if they span more than
18
18
  one line.
19
19
 
20
- Layout/AlignParameters:
20
+ Layout/ParameterAlignment:
21
21
  Description: Align the parameters of a method call if they span more than one line.
22
22
  StyleGuide: "#no-double-indent"
23
23
  EnforcedStyle: with_fixed_indentation
@@ -80,10 +80,6 @@ Style/CommentAnnotation:
80
80
  (TODO, FIXME, OPTIMIZE, HACK, REVIEW).
81
81
  StyleGuide: '#annotate-keywords'
82
82
 
83
- Naming/ClassAndModuleCamelCase:
84
- Description: 'Use CamelCase for classes and modules.'
85
- StyleGuide: '#camelcase-classes'
86
-
87
83
  Style/ClassAndModuleChildren:
88
84
  Description: 'Checks style of children classes and modules.'
89
85
 
@@ -166,7 +162,7 @@ Style/HashSyntax:
166
162
  { :a => 1, :b => 2 }.
167
163
  StyleGuide: '#hash-literals'
168
164
 
169
- Layout/IndentHash:
165
+ Layout/FirstHashElementIndentation:
170
166
  Description: 'Checks the indentation of the first key in a hash literal.'
171
167
 
172
168
  Style/Lambda:
@@ -220,7 +216,7 @@ Layout/SpaceInsideParens:
220
216
  Layout/SpaceBeforeSemicolon:
221
217
  Description: 'No spaces before semicolons.'
222
218
 
223
- Layout/Tab:
219
+ Layout/IndentationStyle:
224
220
  Description: 'No hard tabs.'
225
221
  StyleGuide: '#spaces-indentation'
226
222
 
@@ -228,7 +224,7 @@ Layout/TrailingWhitespace:
228
224
  Description: 'Avoid trailing whitespace.'
229
225
  StyleGuide: '#no-trailing-whitespace'
230
226
 
231
- Layout/TrailingBlankLines:
227
+ Layout/TrailingEmptyLines:
232
228
  Description: 'Checks trailing blank lines and final newline.'
233
229
  StyleGuide: '#newline-eof'
234
230
 
@@ -249,14 +245,6 @@ Metrics/AbcSize:
249
245
  Enabled: true
250
246
  Severity: refactor
251
247
 
252
- ######### PERFORMANCE #########
253
-
254
- Performance/Size:
255
- Description: >-
256
- Use `size` instead of `count` for counting
257
- the number of elements in `Array` and `Hash`.
258
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
259
-
260
248
  ######### RAILS #########
261
249
 
262
250
  Rails/ActionFilter:
@@ -382,7 +370,7 @@ Lint/DuplicateCaseCondition:
382
370
  Lint/DuplicateMethods:
383
371
  Description: 'Check for duplicate method definitions.'
384
372
 
385
- Lint/DuplicatedKey:
373
+ Lint/DuplicateHashKey:
386
374
  Description: 'Check for duplicate keys in hash literals.'
387
375
 
388
376
  Lint/EachWithObjectArgument:
@@ -406,7 +394,7 @@ Lint/EmptyWhen:
406
394
  Layout/EndAlignment:
407
395
  Description: 'Align ends correctly.'
408
396
 
409
- Lint/EndInMethod:
397
+ Style/EndBlock:
410
398
  Description: 'END blocks should not be placed inside method definitions.'
411
399
 
412
400
  Lint/EnsureReturn:
@@ -421,7 +409,7 @@ Lint/FloatOutOfRange:
421
409
  Lint/FormatParameterMismatch:
422
410
  Description: 'The number of parameters to format/sprint must match the fields.'
423
411
 
424
- Lint/HandleExceptions:
412
+ Lint/SuppressedException:
425
413
  Description: "Don't suppress exception."
426
414
  StyleGuide: '#dont-hide-exceptions'
427
415
 
@@ -500,7 +488,7 @@ Lint/ShadowingOuterLocalVariable:
500
488
  Do not use the same name as outer local variable
501
489
  for block arguments or block local variables.
502
490
 
503
- Lint/StringConversionInInterpolation:
491
+ Lint/RedundantStringCoercion:
504
492
  Description: 'Checks for Object#to_s usage in string interpolation.'
505
493
  StyleGuide: '#no-to-s'
506
494
 
@@ -510,13 +498,13 @@ Lint/UnderscorePrefixedVariableName:
510
498
  Lint/UnifiedInteger:
511
499
  Description: 'Use Integer instead of Fixnum or Bignum'
512
500
 
513
- Lint/UnneededCopDisableDirective:
501
+ Lint/RedundantCopDisableDirective:
514
502
  Description: >-
515
503
  Checks for rubocop:disable comments that can be removed.
516
504
  Note: this cop is not disabled when disabling all cops.
517
505
  It must be explicitly disabled.
518
506
 
519
- Lint/UnneededSplatExpansion:
507
+ Lint/RedundantSplatExpansion:
520
508
  Description: 'Checks for splat unnecessarily being called on literals'
521
509
 
522
510
  Lint/UnusedBlockArgument:
@@ -538,12 +526,9 @@ Lint/UselessAssignment:
538
526
  Description: 'Checks for useless assignment to a local variable.'
539
527
  StyleGuide: '#underscore-unused-vars'
540
528
 
541
- Lint/UselessComparison:
529
+ Lint/BinaryOperatorWithIdenticalOperands:
542
530
  Description: 'Checks for comparison of something with itself.'
543
531
 
544
- Lint/UselessElseWithoutRescue:
545
- Description: 'Checks for useless `else` in `begin..end` without `rescue`.'
546
-
547
532
  Lint/UselessSetterCall:
548
533
  Description: 'Checks for useless setter call to a local variable.'
549
534
 
@@ -567,14 +552,11 @@ Layout/FirstArrayElementLineBreak:
567
552
  Description: Checks for a line break before the first element in a multi-line array.
568
553
 
569
554
  Layout/IndentationConsistency:
570
- Description: Keep indentation straight.
555
+ Description: This cop checks for inconsistent indentation.
571
556
  StyleGuide: "#spaces-indentation"
572
- EnforcedStyle: rails
573
-
574
- Lint/Syntax:
575
- Description: Checks syntax error
557
+ EnforcedStyle: indented_internal_methods
576
558
 
577
- Lint/UnneededRequireStatement:
559
+ Lint/RedundantRequireStatement:
578
560
  Description: Checks for unnecessary `require` statement.
579
561
 
580
562
  Naming/AsciiIdentifiers:
@@ -618,7 +600,7 @@ Style/TrailingBodyOnModule:
618
600
 
619
601
  # RSpec
620
602
 
621
- FactoryBot/AttributeDefinedStatically:
603
+ RSpec/FactoryBot/AttributeDefinedStatically:
622
604
  Description: Always declare attribute values as blocks.
623
605
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
624
606
 
@@ -644,10 +626,6 @@ RSpec/ImplicitExpect:
644
626
  EnforcedStyle: is_expected
645
627
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
646
628
 
647
- RSpec/InvalidPredicateMatcher:
648
- Description: Checks invalid usage for predicate matcher.
649
- StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher
650
-
651
629
  RSpec/IteratedExpectation:
652
630
  Description: Check that `all` matcher is used instead of iterating over an array.
653
631
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
@@ -699,3 +677,13 @@ RSpec/ScatteredLet:
699
677
 
700
678
  RSpec/Focus:
701
679
  Enabled: true
680
+
681
+ Style/AndOr:
682
+ Enabled: true
683
+ EnforcedStyle: always
684
+
685
+ Style/Not:
686
+ Enabled: true
687
+
688
+ Style/NegatedUnless:
689
+ Enabled: true
metadata CHANGED
@@ -1,43 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcadia_cops
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.3
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - justin
7
+ - engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-08 00:00:00.000000000 Z
11
+ date: 2022-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.63.1
19
+ version: 1.29.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: 0.63.1
26
+ version: 1.29.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.9'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.9'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rubocop-rspec
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - '='
45
+ - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '1.32'
47
+ version: '2.2'
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - '='
52
+ - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '1.32'
54
+ version: '2.2'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -68,7 +82,7 @@ dependencies:
68
82
  version: '0'
69
83
  description: Contains enabled rubocops for arcadia power ruby repos.
70
84
  email:
71
- - justin@arcadiapower.com
85
+ - engineering@arcadia.com
72
86
  executables: []
73
87
  extensions: []
74
88
  extra_rdoc_files: []
@@ -95,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  requirements: []
98
- rubygems_version: 3.1.2
112
+ rubygems_version: 3.1.6
99
113
  signing_key:
100
114
  specification_version: 4
101
115
  summary: Arcadia Power Style Cops