arcadia_cops 3.5.2 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/config/config.yml +4 -5
  4. data/config/enabled.yml +27 -36
  5. metadata +27 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1de22ddff459b8551fb3042552b94a683600fe2987581029c94d66f9cd982ee8
4
- data.tar.gz: f0f15d8212cc4b70c9fc7b13db2f89cdee6eb9b0dc306040ffa159454a2d53e2
3
+ metadata.gz: 9a2a7f189612deeb9baccc7263d6073b50d2427cfbf872249f5542933c5d14d5
4
+ data.tar.gz: 64c10b3afbb78922b9bd45d4dc4c3e983d4af5b06c640cfcdf22046e9ad562f5
5
5
  SHA512:
6
- metadata.gz: 175b4faf9ef5e8679c1aa1ed8b8da37f43bf33eb82b74f6489a8c2aa9702b1ec3b2174221757330763b6fa12209ae2824d6ac0a81e82d247e21ff1a9319089c4
7
- data.tar.gz: 8bf405fc5f047876afa618158ee1e7c68a97196d0befa3c87ec7798267d0feb6f79c98cd4f699d98cc92226d471f90c635cf2d3eaf7746a052484a9567f5aa1f
6
+ metadata.gz: 7eb54852ac6432b17b03179224c483af855e743b2d5f1510f612fe06b46da9e460a8bb32e45304843fc3745f0004f005ebf7d8f429b7804b3d80632b67c070d9
7
+ data.tar.gz: 929226883a40d7b0a5add124a5c77154feecdc577d37cebbf888016592d6880eefca8d635d4c5a6caca755f21775864fe6b89508b8d06b8f85fd9bcbaeaa7d43
data/README.md CHANGED
@@ -21,6 +21,8 @@ To see all cops including those that aren't enabled run `bundle exec rubocop --s
21
21
  ## Release
22
22
 
23
23
  Ensure you have bumped the version and run `rake release` to release to rubygems.org.
24
+ If this command appears to be hanging, it's probably expecting an OTP code for authentication.
25
+ Updating rubygems (`gem update --system`) and bundler (`bundle update --bundler`) seem to fix this.
24
26
 
25
27
  ## Other
26
28
 
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:
@@ -70,7 +72,4 @@ AllCops:
70
72
  # If a value is specified for TargetRubyVersion then it is used.
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
- TargetRubyVersion: 2.5
74
-
75
- Rails:
76
- Enabled: false
75
+ # TargetRubyVersion: 2.5 # SPECIFY IN PROJECT .ruby-version file
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,7 +526,7 @@ 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
532
  Lint/UselessElseWithoutRescue:
@@ -567,14 +555,11 @@ Layout/FirstArrayElementLineBreak:
567
555
  Description: Checks for a line break before the first element in a multi-line array.
568
556
 
569
557
  Layout/IndentationConsistency:
570
- Description: Keep indentation straight.
558
+ Description: This cop checks for inconsistent indentation.
571
559
  StyleGuide: "#spaces-indentation"
572
- EnforcedStyle: rails
573
-
574
- Lint/Syntax:
575
- Description: Checks syntax error
560
+ EnforcedStyle: indented_internal_methods
576
561
 
577
- Lint/UnneededRequireStatement:
562
+ Lint/RedundantRequireStatement:
578
563
  Description: Checks for unnecessary `require` statement.
579
564
 
580
565
  Naming/AsciiIdentifiers:
@@ -618,7 +603,7 @@ Style/TrailingBodyOnModule:
618
603
 
619
604
  # RSpec
620
605
 
621
- FactoryBot/AttributeDefinedStatically:
606
+ RSpec/FactoryBot/AttributeDefinedStatically:
622
607
  Description: Always declare attribute values as blocks.
623
608
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
624
609
 
@@ -644,10 +629,6 @@ RSpec/ImplicitExpect:
644
629
  EnforcedStyle: is_expected
645
630
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
646
631
 
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
632
  RSpec/IteratedExpectation:
652
633
  Description: Check that `all` matcher is used instead of iterating over an array.
653
634
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
@@ -699,3 +680,13 @@ RSpec/ScatteredLet:
699
680
 
700
681
  RSpec/Focus:
701
682
  Enabled: true
683
+
684
+ Style/AndOr:
685
+ Enabled: true
686
+ EnforcedStyle: always
687
+
688
+ Style/Not:
689
+ Enabled: true
690
+
691
+ Style/NegatedUnless:
692
+ 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.2
4
+ version: 4.0.1
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-02-20 00:00:00.000000000 Z
11
+ date: 2022-03-11 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.26'
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.26'
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.0.3
99
113
  signing_key:
100
114
  specification_version: 4
101
115
  summary: Arcadia Power Style Cops