arcadia_cops 3.3.0 → 4.0.0

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 +41 -40
  5. metadata +35 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1965af731f8b64305883c0dd8c915f4962ce57fc426eafd7bc2a04e8627690ef
4
- data.tar.gz: 1c0f3379c1b27fb7bd684f27efb37b7af302cd505304abd653ff03ad0af029e5
3
+ metadata.gz: 714b9d3dc23913b5a89337e4a5551632776738ef54046942157ce6d06c112a7a
4
+ data.tar.gz: b7c9d8e5a4e0081656dadf9751c6fa268f163464647c088e24a9862e8d3b3160
5
5
  SHA512:
6
- metadata.gz: a0a5e7004cf2edf2782076eb6f38c3e4d1918c532e9b35eca0b66e3d959392cbf1487cb789216e58baccab85c4e3e4c36f8ddfa568b38a3c673bc805f295090e
7
- data.tar.gz: e08b9b2198adeb29bcc10db25503cc77711e90281050b365fd3a77013a1215ee68223f1b280709d200aa14903c674d6bab66fc1a2f85715610fe27fbb2f81366
6
+ metadata.gz: 966b8836e19926088a5df02b7f6e466c2afa13c34df55f2000e491bb251f3ea054c806ab255f9f3dc0e63d2b4c17a3a9c4faa35e88bbcbe6b86b1abf9c7e7637
7
+ data.tar.gz: 5d8b2ed5eb87eaea927afa7f76d7499cd4674b7d781eb10605e64b77ebe6ed453fc6c3b1cfda42b8a6e29d59c20d10324f596f96f27c0cd73b8c66a945e36d15
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.3
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
 
@@ -106,10 +102,6 @@ Style/TrailingCommaInArguments:
106
102
  Description: 'Checks for trailing comma in argument lists.'
107
103
  StyleGuide: '#no-trailing-params-comma'
108
104
 
109
- Style/TrailingCommaInArguments:
110
- Description: 'Checks for trailing comma in argument lists.'
111
- StyleGuide: '#no-trailing-params-comma'
112
-
113
105
  Style/TrailingCommaInArrayLiteral:
114
106
  Description: 'Checks for trailing comma in array literals.'
115
107
  StyleGuide: '#no-trailing-array-commas'
@@ -170,7 +162,7 @@ Style/HashSyntax:
170
162
  { :a => 1, :b => 2 }.
171
163
  StyleGuide: '#hash-literals'
172
164
 
173
- Layout/IndentHash:
165
+ Layout/FirstHashElementIndentation:
174
166
  Description: 'Checks the indentation of the first key in a hash literal.'
175
167
 
176
168
  Style/Lambda:
@@ -224,7 +216,7 @@ Layout/SpaceInsideParens:
224
216
  Layout/SpaceBeforeSemicolon:
225
217
  Description: 'No spaces before semicolons.'
226
218
 
227
- Layout/Tab:
219
+ Layout/IndentationStyle:
228
220
  Description: 'No hard tabs.'
229
221
  StyleGuide: '#spaces-indentation'
230
222
 
@@ -232,7 +224,7 @@ Layout/TrailingWhitespace:
232
224
  Description: 'Avoid trailing whitespace.'
233
225
  StyleGuide: '#no-trailing-whitespace'
234
226
 
235
- Layout/TrailingBlankLines:
227
+ Layout/TrailingEmptyLines:
236
228
  Description: 'Checks trailing blank lines and final newline.'
237
229
  StyleGuide: '#newline-eof'
238
230
 
@@ -253,14 +245,6 @@ Metrics/AbcSize:
253
245
  Enabled: true
254
246
  Severity: refactor
255
247
 
256
- ######### PERFORMANCE #########
257
-
258
- Performance/Size:
259
- Description: >-
260
- Use `size` instead of `count` for counting
261
- the number of elements in `Array` and `Hash`.
262
- Reference: 'https://github.com/JuanitoFatas/fast-ruby#arraycount-vs-arraysize-code'
263
-
264
248
  ######### RAILS #########
265
249
 
266
250
  Rails/ActionFilter:
@@ -386,7 +370,7 @@ Lint/DuplicateCaseCondition:
386
370
  Lint/DuplicateMethods:
387
371
  Description: 'Check for duplicate method definitions.'
388
372
 
389
- Lint/DuplicatedKey:
373
+ Lint/DuplicateHashKey:
390
374
  Description: 'Check for duplicate keys in hash literals.'
391
375
 
392
376
  Lint/EachWithObjectArgument:
@@ -410,7 +394,7 @@ Lint/EmptyWhen:
410
394
  Layout/EndAlignment:
411
395
  Description: 'Align ends correctly.'
412
396
 
413
- Lint/EndInMethod:
397
+ Style/EndBlock:
414
398
  Description: 'END blocks should not be placed inside method definitions.'
415
399
 
416
400
  Lint/EnsureReturn:
@@ -425,7 +409,7 @@ Lint/FloatOutOfRange:
425
409
  Lint/FormatParameterMismatch:
426
410
  Description: 'The number of parameters to format/sprint must match the fields.'
427
411
 
428
- Lint/HandleExceptions:
412
+ Lint/SuppressedException:
429
413
  Description: "Don't suppress exception."
430
414
  StyleGuide: '#dont-hide-exceptions'
431
415
 
@@ -504,7 +488,7 @@ Lint/ShadowingOuterLocalVariable:
504
488
  Do not use the same name as outer local variable
505
489
  for block arguments or block local variables.
506
490
 
507
- Lint/StringConversionInInterpolation:
491
+ Lint/RedundantStringCoercion:
508
492
  Description: 'Checks for Object#to_s usage in string interpolation.'
509
493
  StyleGuide: '#no-to-s'
510
494
 
@@ -514,13 +498,13 @@ Lint/UnderscorePrefixedVariableName:
514
498
  Lint/UnifiedInteger:
515
499
  Description: 'Use Integer instead of Fixnum or Bignum'
516
500
 
517
- Lint/UnneededCopDisableDirective:
501
+ Lint/RedundantCopDisableDirective:
518
502
  Description: >-
519
503
  Checks for rubocop:disable comments that can be removed.
520
504
  Note: this cop is not disabled when disabling all cops.
521
505
  It must be explicitly disabled.
522
506
 
523
- Lint/UnneededSplatExpansion:
507
+ Lint/RedundantSplatExpansion:
524
508
  Description: 'Checks for splat unnecessarily being called on literals'
525
509
 
526
510
  Lint/UnusedBlockArgument:
@@ -542,7 +526,7 @@ Lint/UselessAssignment:
542
526
  Description: 'Checks for useless assignment to a local variable.'
543
527
  StyleGuide: '#underscore-unused-vars'
544
528
 
545
- Lint/UselessComparison:
529
+ Lint/BinaryOperatorWithIdenticalOperands:
546
530
  Description: 'Checks for comparison of something with itself.'
547
531
 
548
532
  Lint/UselessElseWithoutRescue:
@@ -571,14 +555,11 @@ Layout/FirstArrayElementLineBreak:
571
555
  Description: Checks for a line break before the first element in a multi-line array.
572
556
 
573
557
  Layout/IndentationConsistency:
574
- Description: Keep indentation straight.
558
+ Description: This cop checks for inconsistent indentation.
575
559
  StyleGuide: "#spaces-indentation"
576
- EnforcedStyle: rails
577
-
578
- Lint/Syntax:
579
- Description: Checks syntax error
560
+ EnforcedStyle: indented_internal_methods
580
561
 
581
- Lint/UnneededRequireStatement:
562
+ Lint/RedundantRequireStatement:
582
563
  Description: Checks for unnecessary `require` statement.
583
564
 
584
565
  Naming/AsciiIdentifiers:
@@ -622,7 +603,7 @@ Style/TrailingBodyOnModule:
622
603
 
623
604
  # RSpec
624
605
 
625
- FactoryBot/AttributeDefinedStatically:
606
+ RSpec/FactoryBot/AttributeDefinedStatically:
626
607
  Description: Always declare attribute values as blocks.
627
608
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/FactoryBot/AttributeDefinedStatically
628
609
 
@@ -648,10 +629,6 @@ RSpec/ImplicitExpect:
648
629
  EnforcedStyle: is_expected
649
630
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ImplicitExpect
650
631
 
651
- RSpec/InvalidPredicateMatcher:
652
- Description: Checks invalid usage for predicate matcher.
653
- StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/InvalidPredicateMatcher
654
-
655
632
  RSpec/IteratedExpectation:
656
633
  Description: Check that `all` matcher is used instead of iterating over an array.
657
634
  StyleGuide: http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/IteratedExpectation
@@ -679,3 +656,27 @@ Layout/SpaceInsideStringInterpolation:
679
656
  Style/ReturnNil:
680
657
  Description: Use return instead of return nil.
681
658
  EnforcedStyle: return
659
+
660
+ Style/Dir:
661
+ Description: Use the `__dir__` method to retrieve the canonicalized absolute path
662
+ to the current file.
663
+ Enabled: true
664
+
665
+ Style/ExpandPathArguments:
666
+ Description: Use `expand_path(__dir__)` instead of `expand_path('..', __FILE__)`.
667
+ Enabled: true
668
+
669
+ Layout/SpaceInsideHashLiteralBraces:
670
+ Enabled: true
671
+
672
+ Style/RedundantFreeze:
673
+ Enabled: true
674
+
675
+ RSpec/ScatteredSetup:
676
+ Enabled: true
677
+
678
+ RSpec/ScatteredLet:
679
+ Enabled: true
680
+
681
+ RSpec/Focus:
682
+ Enabled: true
metadata CHANGED
@@ -1,57 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arcadia_cops
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - justin
8
- autorequire:
7
+ - engineering
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-05 00:00:00.000000000 Z
11
+ date: 2021-04-23 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.59.0
19
+ version: '1.13'
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.59.0
26
+ version: '1.13'
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.29'
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.29'
54
+ version: '2.2'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ">="
59
+ - - ">"
46
60
  - !ruby/object:Gem::Version
47
- version: '0'
61
+ version: 2.0.2
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ">="
66
+ - - ">"
53
67
  - !ruby/object:Gem::Version
54
- version: '0'
68
+ version: 2.0.2
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  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: []
@@ -76,11 +90,11 @@ files:
76
90
  - README.md
77
91
  - config/config.yml
78
92
  - config/enabled.yml
79
- homepage: https://github.com/ArcadiaPower/rubocop/
93
+ homepage: https://github.com/ArcadiaPower/arcadia_cops/
80
94
  licenses:
81
95
  - MIT
82
96
  metadata: {}
83
- post_install_message:
97
+ post_install_message:
84
98
  rdoc_options: []
85
99
  require_paths:
86
100
  - lib
@@ -95,9 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  requirements: []
98
- rubyforge_project:
99
- rubygems_version: 2.7.7
100
- signing_key:
112
+ rubygems_version: 3.1.2
113
+ signing_key:
101
114
  specification_version: 4
102
115
  summary: Arcadia Power Style Cops
103
116
  test_files: []