armitage-rubocop 0.92.0 → 1.6.1

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: fbc0557d76b3ad87b560318672e7d972683e28746c2940bb53f4c2e927bfa304
4
- data.tar.gz: 211abc70c147c6d5b27d3953daf4980d8265f795db6a857723bda539daec31eb
3
+ metadata.gz: b300bd4a0d4d7b01a9c2249f1e8fb83ce5fbdcbc1925c056eecbdba03a6205b3
4
+ data.tar.gz: 58451e1b8322fec8e993db5639c2d60bfb9b1eaa77c47c724af349baec061536
5
5
  SHA512:
6
- metadata.gz: c060c8bd643347ebad317d6a43ecfabda9db037c2c109f0efe1c8e6abab9abb6ff539eadb194da313dac137e9e737fe565ddca77275095f202119cfcaf31a316
7
- data.tar.gz: 971daba115f8495e949e3bce691586de6db7d28f42b291efda6f19361976b676f4ba5171f2021e18fd423b03236951f86d283644060c04bf259568586e18eae9
6
+ metadata.gz: 70ed42502211016d45dfbd6b890daa0a2187faef42bd29aeaf81dc2e66686d12499718469e3da1fb6ad07581b8469ea02e956d09a92fed76bebe5fcda53f3750
7
+ data.tar.gz: 254883a9930ff28b65f88fb7ec025c3ea1c686be70e41385d002ebb950408fc091777a736ac905d64b3ae2e85568e45c122be4a39cd35faa0b1da815b3f8fe91
data/.gitignore CHANGED
@@ -7,7 +7,6 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  .rspec_status
10
- /Gemfile.lock
11
10
  .ruby-version
12
11
  gemfiles/*.lock
13
12
  *.gem
@@ -3,4 +3,5 @@ inherit_from:
3
3
  - ./lib/rubocop.rake.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.7.1
6
+ NewCops: enable
7
+ TargetRubyVersion: 2.7.2
@@ -0,0 +1,78 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ armitage-rubocop (1.6.1)
5
+ rubocop (= 1.6.1)
6
+ rubocop-performance (= 1.9.1)
7
+ rubocop-rails (= 2.9.0)
8
+ rubocop-rake (= 0.5.1)
9
+ rubocop-rspec (= 2.0.1)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ activesupport (6.1.0)
15
+ concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ tzinfo (~> 2.0)
19
+ zeitwerk (~> 2.3)
20
+ ast (2.4.1)
21
+ coderay (1.1.3)
22
+ concurrent-ruby (1.1.7)
23
+ i18n (1.8.5)
24
+ concurrent-ruby (~> 1.0)
25
+ method_source (1.0.0)
26
+ minitest (5.14.2)
27
+ parallel (1.20.1)
28
+ parser (2.7.2.0)
29
+ ast (~> 2.4.1)
30
+ pry (0.13.1)
31
+ coderay (~> 1.1)
32
+ method_source (~> 1.0)
33
+ rack (2.2.3)
34
+ rainbow (3.0.0)
35
+ rake (13.0.1)
36
+ regexp_parser (2.0.0)
37
+ rexml (3.2.4)
38
+ rubocop (1.6.1)
39
+ parallel (~> 1.10)
40
+ parser (>= 2.7.1.5)
41
+ rainbow (>= 2.2.2, < 4.0)
42
+ regexp_parser (>= 1.8, < 3.0)
43
+ rexml
44
+ rubocop-ast (>= 1.2.0, < 2.0)
45
+ ruby-progressbar (~> 1.7)
46
+ unicode-display_width (>= 1.4.0, < 2.0)
47
+ rubocop-ast (1.3.0)
48
+ parser (>= 2.7.1.5)
49
+ rubocop-performance (1.9.1)
50
+ rubocop (>= 0.90.0, < 2.0)
51
+ rubocop-ast (>= 0.4.0)
52
+ rubocop-rails (2.9.0)
53
+ activesupport (>= 4.2.0)
54
+ rack (>= 1.1)
55
+ rubocop (>= 0.90.0, < 2.0)
56
+ rubocop-rake (0.5.1)
57
+ rubocop
58
+ rubocop-rspec (2.0.1)
59
+ rubocop (~> 1.0)
60
+ rubocop-ast (>= 1.1.0)
61
+ ruby-progressbar (1.10.1)
62
+ tzinfo (2.0.3)
63
+ concurrent-ruby (~> 1.0)
64
+ unicode-display_width (1.7.0)
65
+ zeitwerk (2.4.2)
66
+
67
+ PLATFORMS
68
+ ruby
69
+ x86_64-darwin-20
70
+
71
+ DEPENDENCIES
72
+ armitage-rubocop!
73
+ bundler
74
+ pry
75
+ rake
76
+
77
+ BUNDLED WITH
78
+ 2.2.0
data/Rakefile CHANGED
@@ -5,20 +5,21 @@ require 'rubocop/rake_task'
5
5
  require 'open3'
6
6
  require 'yaml'
7
7
  require 'rubocop'
8
- require 'rubocop-rails'
9
8
  require 'rubocop-performance'
10
9
  require 'rubocop-rspec'
10
+ require 'rubocop-rails'
11
11
  require 'rubocop-rake'
12
12
 
13
13
  RuboCop::RakeTask.new(:rubocop) do |t|
14
14
  config_path = File.expand_path(File.join('.rubocop.yml'), __dir__)
15
15
  t.options = ['--config', config_path]
16
- t.requires << 'rubocop-rspec'
17
16
  t.requires << 'rubocop-performance'
18
17
  t.requires << 'rubocop-rails'
18
+ t.requires << 'rubocop-rspec'
19
19
  t.requires << 'rubocop-rake'
20
20
  end
21
21
 
22
+ ARMITAGE_RUBOCOP_PATH = Pathname.new(__FILE__).join('../.rubocop.yml')
22
23
  NON_CHECKABLE_COPS = %w[Rails].freeze # NOTE: Global "Rails" cop has only `Enabled` option
23
24
 
24
25
  # rubocop:disable Rails/RakeEnvironment
@@ -78,58 +79,17 @@ namespace :armitage_rubocop do
78
79
 
79
80
  desc 'Checks that all defined cops can be used'
80
81
  task :recognizable_cops do
81
- yamls = Dir[Pathname.new(__FILE__).join('../lib/**/*.yml')]
82
- invalid_cops = Hash.new { |h, k| h[k] = +'' }
83
-
84
- # NOTE: strongly rubocop-related realization
85
- # - see https://github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/config.rb
86
- # - see https://github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/config_loader.rb
87
- # - RuboCop::Config#validate
88
- # - RuboCop::Config#warn_about_unrecognized_cops
89
- # - RuboCop::ConfigLoader.load_file
90
- # - RuboCop::ConfigLoader.default_configuration
91
- yamls.each do |yaml_file|
92
- rubocop_config = RuboCop::ConfigLoader.load_file(yaml_file)
93
-
94
- # NOTE: validate cop existence
95
- rubocop_config.each_key do |cop|
96
- next if RuboCop::ConfigLoader.default_configuration.key?(cop)
97
- next if RuboCop::Cop::Cop.registry.contains_cop_matching?([cop])
98
- next if cop == 'inherit_mode'
99
-
100
- invalid_cops[cop] = "\e[31mBAD COP\e[0m"
101
- end
102
-
103
- # NOTE: validate cop params
104
- rubocop_config.each_key do |cop|
105
- next if invalid_cops.key?(cop)
106
-
107
- invalid_params = Set.new
108
-
109
- rubocop_config[cop].each_key do |cop_param|
110
- next if RuboCop::ConfigValidator::COMMON_PARAMS.include?(cop_param)
111
- next if NON_CHECKABLE_COPS.include?(cop)
112
- next if RuboCop::ConfigLoader.default_configuration[cop].key?(cop_param)
113
-
114
- invalid_params << "\e[35m#{cop_param}\e[0m"
115
- end
116
-
117
- next if invalid_params.empty?
118
-
119
- invalid_cops[cop] = "\e[31mBAD PARAMS\e[0m: #{invalid_params.to_a.join(', ')}"
120
- end
121
- end
122
-
123
- if invalid_cops.empty?
124
- puts "[\e[32mCOP RECOGNITION CHECK\e[0m] => \e[1;33mall cops are recognizable!\e[0m"
125
- else
126
- invalid_cops_message = invalid_cops.each_pair.map do |cop, message|
127
- "[\e[32m#{cop}\e[0m]\t- #{message}"
128
- end.join("\n")
82
+ RuboCop::ConfigLoader.load_file(ARMITAGE_RUBOCOP_PATH)
83
+ # TODO: validate each configured cop individually
84
+ puts "[\e[32mCOP RECOGNITION CHECK\e[0m] => \e[1;33mall cops are recognizable!\e[0m"
85
+ rescue
86
+ abort "[\e[31mCOP RECOGNITION CHECK\e[0m] => some cops can not be fully recognized!\n" \
87
+ "Run rake validation:recognize_and_show to show which cops have incompatabilities."
88
+ end
129
89
 
130
- abort "[\e[31mCOP RECOGNITION CHECK\e[0m] => some cops can not be fully recognized:\n" \
131
- "#{invalid_cops_message}"
132
- end
90
+ desc 'Show rubocop\'s validation result output'
91
+ task :recognize_and_show do
92
+ RuboCop::ConfigLoader.load_file(ARMITAGE_RUBOCOP_PATH) rescue nil
133
93
  end
134
94
  end
135
95
  end
@@ -4,7 +4,7 @@ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.version = '0.92.0'
7
+ spec.version = '1.6.1'
8
8
 
9
9
  spec.name = 'armitage-rubocop'
10
10
  spec.license = 'MIT'
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
22
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
23
  end
24
24
 
25
- spec.add_dependency 'rubocop', '= 0.92.0'
26
- spec.add_dependency 'rubocop-performance', '= 1.8.1'
27
- spec.add_dependency 'rubocop-rails', '= 2.8.1'
28
- spec.add_dependency 'rubocop-rspec', '= 1.43.2'
25
+ spec.add_dependency 'rubocop', '= 1.6.1'
26
+ spec.add_dependency 'rubocop-performance', '= 1.9.1'
27
+ spec.add_dependency 'rubocop-rails', '= 2.9.0'
28
+ spec.add_dependency 'rubocop-rspec', '= 2.0.1'
29
29
  spec.add_dependency 'rubocop-rake', '= 0.5.1'
30
30
 
31
31
  spec.add_development_dependency 'bundler'
@@ -111,6 +111,9 @@ Layout/EmptyLineBetweenDefs:
111
111
  Enabled: true
112
112
  NumberOfEmptyLines: 1
113
113
  AllowAdjacentOneLineDefs: false
114
+ EmptyLineBetweenMethodDefs: true
115
+ EmptyLineBetweenClassDefs: true
116
+ EmptyLineBetweenModuleDefs: true
114
117
 
115
118
  Layout/EmptyLines:
116
119
  Enabled: true
@@ -25,6 +25,8 @@ Lint/CircularArgumentReference:
25
25
 
26
26
  Lint/ConstantDefinitionInBlock:
27
27
  Enabled: false
28
+ AllowedMethods:
29
+ - enums
28
30
 
29
31
  Lint/ConstantResolution:
30
32
  Enabled: false
@@ -44,6 +46,9 @@ Lint/DisjunctiveAssignmentInConstructor:
44
46
  Enabled: true
45
47
  AutoCorrect: false
46
48
 
49
+ Lint/DuplicateBranch:
50
+ Enabled: true
51
+
47
52
  Lint/DuplicateCaseCondition:
48
53
  Enabled: true
49
54
 
@@ -59,6 +64,9 @@ Lint/DuplicateElsifCondition:
59
64
  Lint/DuplicateRequire:
60
65
  Enabled: true
61
66
 
67
+ Lint/DuplicateRegexpCharacterClassElement:
68
+ Enabled: true
69
+
62
70
  Lint/EachWithObjectArgument:
63
71
  Enabled: true
64
72
 
@@ -67,6 +75,15 @@ Lint/DuplicateRescueException:
67
75
 
68
76
  Lint/ElseLayout:
69
77
  Enabled: true
78
+ AutoCorrect: true
79
+
80
+ Lint/EmptyBlock:
81
+ Enabled: true
82
+ AllowComments: true
83
+
84
+ Lint/EmptyClass:
85
+ Enabled: false
86
+ AllowComments: true
70
87
 
71
88
  Lint/EmptyConditionalBody:
72
89
  Enabled: true
@@ -118,6 +135,9 @@ Lint/StructNewOverride:
118
135
  Lint/SuppressedException:
119
136
  Enabled: false
120
137
 
138
+ Lint/HashCompareByIdentity:
139
+ Enabled: false
140
+
121
141
  Lint/HeredocMethodCallPosition:
122
142
  Enabled: true
123
143
 
@@ -156,10 +176,11 @@ Lint/MixedRegexpCaptureTypes:
156
176
  # NOTE: if you use named captures - numbered captures will be ignored. it is bad. validate it.
157
177
 
158
178
  Lint/MissingSuper:
159
- Enabled: false
179
+ Enabled: true
160
180
 
161
181
  Lint/MultipleComparison:
162
182
  Enabled: true
183
+ AllowMethodComparison: true
163
184
 
164
185
  Lint/NestedMethodDefinition:
165
186
  Enabled: true
@@ -204,6 +225,16 @@ Lint/RaiseException:
204
225
  Lint/RandOne:
205
226
  Enabled: true
206
227
 
228
+ Lint/RedundantSafeNavigation:
229
+ Enabled: true
230
+ AllowedMethods:
231
+ - instance_of?
232
+ - kind_of?
233
+ - is_a?
234
+ - eql?
235
+ - respond_to?
236
+ - equal?
237
+
207
238
  Lint/RedundantWithIndex:
208
239
  Enabled: true
209
240
 
@@ -258,6 +289,9 @@ Lint/RedundantStringCoercion:
258
289
  Lint/Syntax:
259
290
  Enabled: true
260
291
 
292
+ Lint/ToEnumArguments:
293
+ Enabled: false
294
+
261
295
  Lint/ToJSON:
262
296
  Enabled: true
263
297
 
@@ -267,9 +301,15 @@ Lint/TopLevelReturnWithArgument:
267
301
  Lint/TrailingCommaInAttributeDeclaration:
268
302
  Enabled: true
269
303
 
304
+ Lint/UnexpectedBlockArity:
305
+ Enabled: false
306
+
270
307
  Lint/UnderscorePrefixedVariableName:
271
308
  Enabled: false
272
309
 
310
+ Lint/UnmodifiedReduceAccumulator:
311
+ Enabled: true
312
+
273
313
  Lint/UnifiedInteger:
274
314
  Enabled: true
275
315
 
@@ -329,6 +369,7 @@ Lint/UselessMethodDefinition:
329
369
 
330
370
  Lint/UselessSetterCall:
331
371
  Enabled: true
372
+ AutoCorrect: true
332
373
 
333
374
  Lint/UselessTimes:
334
375
  Enabled: true
@@ -1,13 +1,16 @@
1
1
  Metrics/AbcSize:
2
2
  Enabled: true
3
3
  Max: 19
4
+ CountRepeatedAttributes: true
4
5
  IgnoredMethods: []
5
6
 
6
7
  Metrics/BlockLength:
7
8
  Enabled: true
8
9
  CountComments: false
10
+ CountAsOne: []
9
11
  Max: 25
10
- ExcludedMethods: []
12
+ IgnoredMethods:
13
+ - refine
11
14
  Exclude:
12
15
  - Rakefile
13
16
  - spec/**/*
@@ -32,6 +35,8 @@ Metrics/MethodLength:
32
35
  Enabled: true
33
36
  Max: 25
34
37
  CountComments: false
38
+ CountAsOne: []
39
+ IgnoredMethods: []
35
40
 
36
41
  Metrics/ModuleLength:
37
42
  Enabled: true
@@ -41,6 +46,7 @@ Metrics/ModuleLength:
41
46
  Metrics/ParameterLists:
42
47
  Enabled: true
43
48
  Max: 5
49
+ MaxOptionalParameters: 3
44
50
  CountKeywordArgs: true
45
51
 
46
52
  Metrics/PerceivedComplexity:
@@ -7,6 +7,7 @@ Naming/AsciiIdentifiers:
7
7
 
8
8
  Naming/BinaryOperatorParameterName:
9
9
  Enabled: false
10
+ AutoCorrect: true
10
11
 
11
12
  Naming/ClassAndModuleCamelCase:
12
13
  Enabled: true
@@ -24,6 +25,7 @@ Naming/FileName:
24
25
  Naming/HeredocDelimiterCase:
25
26
  Enabled: true
26
27
  EnforcedStyle: uppercase
28
+ AutoCorrect: true
27
29
 
28
30
  Naming/HeredocDelimiterNaming:
29
31
  Enabled: false
@@ -73,3 +75,6 @@ Naming/VariableName:
73
75
  Naming/VariableNumber:
74
76
  Enabled: true
75
77
  EnforcedStyle: snake_case
78
+ CheckMethodNames: true
79
+ CheckSymbols: true
80
+ AllowedIdentifiers: []
@@ -1,3 +1,6 @@
1
+ Performance/ArraySemiInfiniteRangeSlice:
2
+ Enabled: false
3
+
1
4
  Performance/AncestorsInclude:
2
5
  Enabled: true
3
6
 
@@ -7,8 +10,13 @@ Performance/BindCall:
7
10
  Performance/BigDecimalWithNumericArgument:
8
11
  Enabled: true
9
12
 
13
+ Performance/BlockGivenWithExplicitBlock:
14
+ Enabled: false
15
+ AutoCorrect: true
16
+
10
17
  Performance/Caller:
11
18
  Enabled: true
19
+ AutoCorrect: true
12
20
 
13
21
  Performance/CaseWhenSplat:
14
22
  Enabled: true
@@ -27,6 +35,9 @@ Performance/CollectionLiteralInLoop:
27
35
  Enabled: true
28
36
  MinSize: 1
29
37
 
38
+ Performance/ConstantRegexp:
39
+ Enabled: true
40
+
30
41
  Performance/Count:
31
42
  Enabled: true
32
43
  SafeAutoCorrect: false
@@ -62,6 +73,9 @@ Performance/InefficientHashSearch:
62
73
  Performance/IoReadlines:
63
74
  Enabled: true
64
75
 
76
+ Performance/MethodObjectAsBlock:
77
+ Enabled: true
78
+
65
79
  Performance/OpenStruct:
66
80
  Enabled: true
67
81
 
@@ -114,6 +128,7 @@ Performance/StringReplacement:
114
128
 
115
129
  Performance/Sum:
116
130
  Enabled: true
131
+ AutoCorrect: true
117
132
 
118
133
  Performance/TimesMap:
119
134
  Enabled: true
@@ -121,6 +136,7 @@ Performance/TimesMap:
121
136
 
122
137
  Performance/UnfreezeString:
123
138
  Enabled: true
139
+ AutoCorrect: true
124
140
 
125
141
  Performance/UriDefaultParser:
126
142
  Enabled: true
@@ -33,6 +33,12 @@ Rails/ApplicationController:
33
33
  Rails/ApplicationMailer:
34
34
  Enabled: false
35
35
 
36
+ Rails/AttributeDefaultBlockValue:
37
+ Enabled: true
38
+
39
+ Rails/ArelStar:
40
+ Enabled: true
41
+
36
42
  Rails/RakeEnvironment:
37
43
  Enabled: true
38
44
  AutoCorrect: true
@@ -271,6 +277,9 @@ Rails/UnknownEnv:
271
277
  Rails/Validation:
272
278
  Enabled: true
273
279
 
280
+ Rails/WhereEquals:
281
+ Enabled: true
282
+
274
283
  Rails/WhereExists:
275
284
  Enabled: false
276
285
  EnforcedStyle: exists
@@ -11,12 +11,16 @@ Style/Alias:
11
11
  Enabled: true
12
12
  EnforcedStyle: prefer_alias_method
13
13
 
14
+ Style/AndOr:
15
+ Enabled: false
16
+ EnforcedStyle: always
17
+
14
18
  Style/ArrayCoercion:
15
19
  Enabled: true
16
20
 
17
- Style/AndOr:
21
+ Style/ArgumentsForwarding:
18
22
  Enabled: false
19
- EnforcedStyle: always
23
+ AllowOnlyRestArgument: true
20
24
 
21
25
  Style/ArrayJoin:
22
26
  Enabled: true
@@ -69,6 +73,13 @@ Style/ClassCheck:
69
73
  Enabled: true
70
74
  EnforcedStyle: is_a?
71
75
 
76
+ Style/ClassEqualityComparison:
77
+ Enabled: true
78
+ IgnoredMethods:
79
+ - ==
80
+ - equal?
81
+ - eql?
82
+
72
83
  Style/ClassMethods:
73
84
  Enabled: true
74
85
 
@@ -79,6 +90,9 @@ Style/ClassMethodsDefinitions:
79
90
  Style/ClassVars:
80
91
  Enabled: true
81
92
 
93
+ Style/CollectionCompact:
94
+ Enabled: true
95
+
82
96
  Style/CollectionMethods:
83
97
  Enabled: false
84
98
 
@@ -123,6 +137,9 @@ Style/Dir:
123
137
  Style/DisableCopsWithinSourceCodeDirective:
124
138
  Enabled: false
125
139
 
140
+ Style/DocumentDynamicEvalDefinition:
141
+ Enabled: false
142
+
126
143
  Style/Documentation:
127
144
  Enabled: false
128
145
 
@@ -131,6 +148,7 @@ Style/DocumentationMethod:
131
148
 
132
149
  Style/DoubleNegation:
133
150
  Enabled: false
151
+ AutoCorrect: true
134
152
  EnforcedStyle: allowed_in_returns
135
153
 
136
154
  Style/EachForSimpleLoop:
@@ -196,6 +214,7 @@ Style/FormatString:
196
214
 
197
215
  Style/FormatStringToken:
198
216
  Enabled: true
217
+ MaxUnannotatedPlaceholdersAllowed: 1
199
218
  EnforcedStyle: annotated
200
219
 
201
220
  Style/FrozenStringLiteralComment:
@@ -243,6 +262,7 @@ Style/IdenticalConditionalBranches:
243
262
  Style/IfInsideElse:
244
263
  Enabled: true
245
264
  AllowIfModifier: true
265
+ AutoCorrect: true
246
266
 
247
267
  Style/IfUnlessModifier:
248
268
  Enabled: false
@@ -340,7 +360,7 @@ Style/MultilineWhenThen:
340
360
  Enabled: true
341
361
 
342
362
  Style/MultipleComparison:
343
- Enabled: true
363
+ Enabled: false
344
364
 
345
365
  Style/MutableConstant:
346
366
  Enabled: true
@@ -349,6 +369,9 @@ Style/NegatedIf:
349
369
  Enabled: true
350
370
  EnforcedStyle: both
351
371
 
372
+ Style/NegatedIfElseCondition:
373
+ Enabled: false
374
+
352
375
  Style/NegatedUnless:
353
376
  Enabled: false
354
377
  EnforcedStyle: both
@@ -375,6 +398,9 @@ Style/NilComparison:
375
398
  Enabled: true
376
399
  EnforcedStyle: comparison
377
400
 
401
+ Style/NilLambda:
402
+ Enabled: false
403
+
378
404
  Style/NonNilCheck:
379
405
  Enabled: true
380
406
  IncludeSemanticChanges: false
@@ -435,10 +461,14 @@ Style/Proc:
435
461
  Style/RaiseArgs:
436
462
  Enabled: true
437
463
  EnforcedStyle: exploded
464
+ AllowedCompactTypes: []
438
465
 
439
466
  Style/RandomWithOffset:
440
467
  Enabled: true
441
468
 
469
+ Style/RedundantArgument:
470
+ Enabled: false
471
+
442
472
  Style/RedundantAssignment:
443
473
  Enabled: true
444
474
 
@@ -534,6 +564,9 @@ Style/SlicingWithRange:
534
564
  Style/SpecialGlobalVars:
535
565
  Enabled: true
536
566
 
567
+ Style/StaticClass:
568
+ Enabled: true
569
+
537
570
  Style/StabbyLambdaParentheses:
538
571
  Enabled: true
539
572
  EnforcedStyle: require_parentheses
@@ -576,6 +609,9 @@ Style/SymbolLiteral:
576
609
  Style/SymbolProc:
577
610
  Enabled: true
578
611
 
612
+ Style/SwapValues:
613
+ Enabled: true
614
+
579
615
  Style/TernaryParentheses:
580
616
  Enabled: true
581
617
  EnforcedStyle: require_parentheses_when_complex
@@ -636,6 +672,7 @@ Style/RedundantSort:
636
672
 
637
673
  Style/SoleNestedConditional:
638
674
  Enabled: true
675
+ AutoCorrect: true
639
676
  AllowModifier: true
640
677
 
641
678
  Style/UnpackFirst:
@@ -1,8 +1,8 @@
1
- Capybara/CurrentPathExpectation:
1
+ RSpec/Capybara/CurrentPathExpectation:
2
2
  Enabled: true
3
3
 
4
- Capybara/FeatureMethods:
4
+ RSpec/Capybara/FeatureMethods:
5
5
  Enabled: false
6
6
 
7
- Capybara/VisibilityMatcher:
7
+ RSpec/Capybara/VisibilityMatcher:
8
8
  Enabled: true
@@ -1,9 +1,9 @@
1
- FactoryBot/AttributeDefinedStatically:
1
+ RSpec/FactoryBot/AttributeDefinedStatically:
2
2
  Enabled: false
3
3
 
4
- FactoryBot/CreateList:
4
+ RSpec/FactoryBot/CreateList:
5
5
  Enabled: true
6
6
  EnforcedStyle: create_list
7
7
 
8
- FactoryBot/FactoryClassName:
8
+ RSpec/FactoryBot/FactoryClassName:
9
9
  Enabled: true
@@ -1,2 +1,2 @@
1
- Rails/HttpStatus:
1
+ RSpec/Rails/HttpStatus:
2
2
  Enabled: false
@@ -120,9 +120,6 @@ RSpec/InstanceVariable:
120
120
  Enabled: true
121
121
  AssignmentOnly: false
122
122
 
123
- RSpec/InvalidPredicateMatcher:
124
- Enabled: true
125
-
126
123
  RSpec/ItBehavesLike:
127
124
  Enabled: true
128
125
  EnforcedStyle: it_behaves_like
@@ -211,6 +208,9 @@ RSpec/RepeatedExampleGroupBody:
211
208
  RSpec/RepeatedExampleGroupDescription:
212
209
  Enabled: true
213
210
 
211
+ RSpec/RepeatedIncludeExample:
212
+ Enabled: true
213
+
214
214
  RSpec/ReturnFromStub:
215
215
  Enabled: true
216
216
  EnforcedStyle: and_return
@@ -233,6 +233,9 @@ RSpec/SingleArgumentMessageChain:
233
233
  RSpec/SubjectStub:
234
234
  Enabled: true
235
235
 
236
+ RSpec/StubbedMock:
237
+ Enabled: true
238
+
236
239
  RSpec/UnspecifiedException:
237
240
  Enabled: true
238
241
 
@@ -6,16 +6,16 @@ inherit_from:
6
6
  - ./rspec/rails.yml
7
7
  - ./rspec/rspec.yml
8
8
 
9
- AllCops:
10
- RSpec:
11
- Patterns:
12
- - _spec.rb
13
- - "(?:^|/)spec/"
14
- RSpec/FactoryBot:
15
- Patterns:
16
- - spec/factories.rb
17
- - spec/factories/**/*.rb
18
- - spec/support/factories.rb
19
- - spec/support/factories/**/*.rb
20
- - features/support/factires.rb
21
- - features/support/factories/**/*.rb
9
+ RSpec:
10
+ Include:
11
+ - _spec.rb
12
+ - "(?:^|/)spec/"
13
+
14
+ RSpec/FactoryBot:
15
+ Include:
16
+ - spec/factories.rb
17
+ - spec/factories/**/*.rb
18
+ - spec/support/factories.rb
19
+ - spec/support/factories/**/*.rb
20
+ - features/support/factires.rb
21
+ - features/support/factories/**/*.rb
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: armitage-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.92.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rustam Ibragimov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-04 00:00:00.000000000 Z
11
+ date: 2020-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.92.0
19
+ version: 1.6.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.92.0
26
+ version: 1.6.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-performance
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.1
33
+ version: 1.9.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.8.1
40
+ version: 1.9.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 2.8.1
47
+ version: 2.9.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 2.8.1
54
+ version: 2.9.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop-rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.43.2
61
+ version: 2.0.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.43.2
68
+ version: 2.0.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop-rake
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -135,6 +135,7 @@ files:
135
135
  - ".yamllint"
136
136
  - CODE_OF_CONDUCT.md
137
137
  - Gemfile
138
+ - Gemfile.lock
138
139
  - LICENSE.txt
139
140
  - README.md
140
141
  - Rakefile
@@ -164,7 +165,7 @@ homepage: https://github.com/0exp/armitage
164
165
  licenses:
165
166
  - MIT
166
167
  metadata: {}
167
- post_install_message:
168
+ post_install_message:
168
169
  rdoc_options: []
169
170
  require_paths:
170
171
  - lib
@@ -179,8 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
180
  - !ruby/object:Gem::Version
180
181
  version: '0'
181
182
  requirements: []
182
- rubygems_version: 3.1.2
183
- signing_key:
183
+ rubygems_version: 3.2.0
184
+ signing_key:
184
185
  specification_version: 4
185
186
  summary: A set of rubocop settings
186
187
  test_files: []