gitlab-styles 5.4.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/gitlab-styles.gemspec +4 -4
- data/lib/gitlab/styles/rubocop.rb +1 -1
- data/lib/gitlab/styles/rubocop/cop/internal_affairs/deprecate_cop_helper.rb +1 -1
- data/lib/gitlab/styles/rubocop/cop/rspec/verbose_include_metadata.rb +1 -1
- data/lib/gitlab/styles/version.rb +1 -1
- data/rubocop-layout.yml +3 -0
- data/rubocop-lint.yml +21 -0
- data/rubocop-performance.yml +12 -0
- data/rubocop-rails.yml +6 -0
- data/rubocop-style.yml +12 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88825b6aaa4961f16a29bfc14cdb1d590700a74e81fe68e072fccd2046506c6b
|
4
|
+
data.tar.gz: 5634afcb51a117e54f4760c43f12d3b2564d08b62bbcd49d97b7cde7c88014d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99652ceb45ae8e31ac3105bd7913a2c85e0a5a22cd97ad5d30081fd1b55b4d1734671d9cdbfdf1875dbdbc314efb9fe433b8859a18761ebea1d1054f58aa88d1
|
7
|
+
data.tar.gz: 2b16d7dc347ec66fd1656d735bc6427c485c88e27d7fb3030e0a852d76fb338705a976e85fb949b25b3994035134251da3771a9f3c914767d6d7158ecf5137e4
|
data/Gemfile
CHANGED
data/gitlab-styles.gemspec
CHANGED
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.add_dependency 'rubocop', '~> 0.
|
26
|
-
spec.add_dependency 'rubocop-gitlab-security', '~> 0.1.
|
27
|
-
spec.add_dependency 'rubocop-performance', '~> 1.
|
28
|
-
spec.add_dependency 'rubocop-rails', '~> 2.
|
25
|
+
spec.add_dependency 'rubocop', '~> 0.91.1'
|
26
|
+
spec.add_dependency 'rubocop-gitlab-security', '~> 0.1.1'
|
27
|
+
spec.add_dependency 'rubocop-performance', '~> 1.9.2'
|
28
|
+
spec.add_dependency 'rubocop-rails', '~> 2.9'
|
29
29
|
spec.add_dependency 'rubocop-rspec', '~> 1.44'
|
30
30
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
@@ -7,7 +7,7 @@ module Gitlab
|
|
7
7
|
module InternalAffairs
|
8
8
|
# Cop that denies the use of CopHelper.
|
9
9
|
class DeprecateCopHelper < RuboCop::Cop::Cop
|
10
|
-
MSG = 'Do not use `CopHelper` or methods from it, use improved patterns described in https://
|
10
|
+
MSG = 'Do not use `CopHelper` or methods from it, use improved patterns described in https://www.rubydoc.info/gems/rubocop/RuboCop/RSpec/ExpectOffense'
|
11
11
|
|
12
12
|
def_node_matcher :cop_helper, <<~PATTERN
|
13
13
|
(send nil? ${:include :extend :prepend}
|
data/rubocop-layout.yml
CHANGED
data/rubocop-lint.yml
CHANGED
@@ -28,6 +28,9 @@ Lint/BinaryOperatorWithIdenticalOperands:
|
|
28
28
|
Lint/CircularArgumentReference:
|
29
29
|
Enabled: true
|
30
30
|
|
31
|
+
Lint/ConstantDefinitionInBlock: # (new in 0.91)
|
32
|
+
Enabled: true
|
33
|
+
|
31
34
|
# Check for debugger calls.
|
32
35
|
Lint/Debugger:
|
33
36
|
Enabled: true
|
@@ -47,6 +50,9 @@ Lint/DeprecatedOpenSSLConstant:
|
|
47
50
|
Lint/DuplicateElsifCondition:
|
48
51
|
Enabled: true
|
49
52
|
|
53
|
+
Lint/DuplicateRequire: # (new in 0.90)
|
54
|
+
Enabled: true
|
55
|
+
|
50
56
|
# Checks that there are no repeated exceptions used in 'rescue' expressions.
|
51
57
|
# https://docs.rubocop.org/rubocop/0.89/cops_lint.html#lintduplicaterescueexception
|
52
58
|
Lint/DuplicateRescueException:
|
@@ -69,6 +75,9 @@ Lint/EmptyConditionalBody:
|
|
69
75
|
Lint/EmptyEnsure:
|
70
76
|
Enabled: true
|
71
77
|
|
78
|
+
Lint/EmptyFile: # (new in 0.90)
|
79
|
+
Enabled: true
|
80
|
+
|
72
81
|
# Checks for the presence of `when` branches without a body.
|
73
82
|
Lint/EmptyWhen:
|
74
83
|
Enabled: true
|
@@ -94,6 +103,9 @@ Lint/FloatOutOfRange:
|
|
94
103
|
Lint/FormatParameterMismatch:
|
95
104
|
Enabled: true
|
96
105
|
|
106
|
+
Lint/IdentityComparison: # (new in 0.91)
|
107
|
+
Enabled: true
|
108
|
+
|
97
109
|
# Checks for adjacent string literals on the same line, which could better be
|
98
110
|
# represented as a single string literal.
|
99
111
|
Lint/ImplicitStringConcatenation:
|
@@ -200,6 +212,9 @@ Lint/SuppressedException:
|
|
200
212
|
Lint/TopLevelReturnWithArgument:
|
201
213
|
Enabled: true
|
202
214
|
|
215
|
+
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
|
216
|
+
Enabled: true
|
217
|
+
|
203
218
|
# Do not use prefix `_` for a variable that is used.
|
204
219
|
Lint/UnderscorePrefixedVariableName:
|
205
220
|
Enabled: true
|
@@ -238,10 +253,16 @@ Lint/UselessAssignment:
|
|
238
253
|
Lint/UselessElseWithoutRescue:
|
239
254
|
Enabled: true
|
240
255
|
|
256
|
+
Lint/UselessMethodDefinition: # (new in 0.90)
|
257
|
+
Enabled: true
|
258
|
+
|
241
259
|
# Checks for useless setter call to a local variable.
|
242
260
|
Lint/UselessSetterCall:
|
243
261
|
Enabled: true
|
244
262
|
|
263
|
+
Lint/UselessTimes: # (new in 0.91)
|
264
|
+
Enabled: true
|
265
|
+
|
245
266
|
# Possible use of operator/literal/variable in void context.
|
246
267
|
Lint/Void:
|
247
268
|
Enabled: true
|
data/rubocop-performance.yml
CHANGED
@@ -10,6 +10,9 @@ Performance/AncestorsInclude:
|
|
10
10
|
Performance/BigDecimalWithNumericArgument:
|
11
11
|
Enabled: true
|
12
12
|
|
13
|
+
Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
|
14
|
+
Enabled: true
|
15
|
+
|
13
16
|
# Use `caller(n..n)` instead of `caller`.
|
14
17
|
Performance/Caller:
|
15
18
|
Enabled: false
|
@@ -18,11 +21,20 @@ Performance/Caller:
|
|
18
21
|
Performance/Casecmp:
|
19
22
|
Enabled: true
|
20
23
|
|
24
|
+
Performance/CollectionLiteralInLoop: # (new in 1.8)
|
25
|
+
Enabled: true
|
26
|
+
|
27
|
+
Performance/ConstantRegexp: # (new in 1.9)
|
28
|
+
Enabled: true
|
29
|
+
|
21
30
|
# Use `str.{start,end}_with?(x, ..., y, ...)` instead of
|
22
31
|
# `str.{start,end}_with?(x, ...) || str.{start,end}_with?(y, ...)`.
|
23
32
|
Performance/DoubleStartEndWith:
|
24
33
|
Enabled: true
|
25
34
|
|
35
|
+
Performance/MethodObjectAsBlock: # (new in 1.9)
|
36
|
+
Enabled: true
|
37
|
+
|
26
38
|
# Use `Range#cover?` instead of `Range#include?`.
|
27
39
|
Performance/RangeInclude:
|
28
40
|
Enabled: true
|
data/rubocop-rails.yml
CHANGED
@@ -24,6 +24,9 @@ Rails/AfterCommitOverride:
|
|
24
24
|
Rails/ApplicationRecord:
|
25
25
|
Enabled: false
|
26
26
|
|
27
|
+
Rails/AttributeDefaultBlockValue: # (new in 2.9)
|
28
|
+
Enabled: true
|
29
|
+
|
27
30
|
# Enforce using `blank?` and `present?`.
|
28
31
|
Rails/Blank:
|
29
32
|
Enabled: false
|
@@ -168,6 +171,9 @@ Rails/TimeZone:
|
|
168
171
|
Rails/Validation:
|
169
172
|
Enabled: true
|
170
173
|
|
174
|
+
Rails/WhereEquals: # (new in 2.9)
|
175
|
+
Enabled: true
|
176
|
+
|
171
177
|
# Enforces consistent style when using exists?.
|
172
178
|
# https://docs.rubocop.org/rubocop-rails/2.8/cops_rails.html#railswhereexists
|
173
179
|
Rails/WhereExists:
|
data/rubocop-style.yml
CHANGED
@@ -84,6 +84,9 @@ Style/ClassVars:
|
|
84
84
|
Style/ColonMethodCall:
|
85
85
|
Enabled: true
|
86
86
|
|
87
|
+
Style/CombinableLoops: # (new in 0.90)
|
88
|
+
Enabled: true
|
89
|
+
|
87
90
|
# This cop checks that comment annotation keywords are written according
|
88
91
|
# to guidelines.
|
89
92
|
Style/CommentAnnotation:
|
@@ -202,6 +205,9 @@ Style/InfiniteLoop:
|
|
202
205
|
Style/InverseMethods:
|
203
206
|
Enabled: false
|
204
207
|
|
208
|
+
Style/KeywordParametersOrder: # (new in 0.90)
|
209
|
+
Enabled: true
|
210
|
+
|
205
211
|
# Use lambda.call(...) instead of lambda.(...).
|
206
212
|
Style/LambdaCall:
|
207
213
|
Enabled: true
|
@@ -335,6 +341,9 @@ Style/RedundantRegexpCharacterClass:
|
|
335
341
|
Style/RedundantRegexpEscape:
|
336
342
|
Enabled: true
|
337
343
|
|
344
|
+
Style/RedundantSelfAssignment: # (new in 0.90)
|
345
|
+
Enabled: true
|
346
|
+
|
338
347
|
# Use `sort` instead of `sort_by { |x| x }`.
|
339
348
|
Style/RedundantSortBy:
|
340
349
|
Enabled: true
|
@@ -358,6 +367,9 @@ Style/SignalException:
|
|
358
367
|
Style/SlicingWithRange:
|
359
368
|
Enabled: true
|
360
369
|
|
370
|
+
Style/SoleNestedConditional: # (new in 0.89)
|
371
|
+
Enabled: true
|
372
|
+
|
361
373
|
# Check for the usage of parentheses around stabby lambda arguments.
|
362
374
|
Style/StabbyLambdaParentheses:
|
363
375
|
EnforcedStyle: require_parentheses
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-styles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-07 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.
|
19
|
+
version: 0.91.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.
|
26
|
+
version: 0.91.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-gitlab-security
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.1.
|
33
|
+
version: 0.1.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: 0.1.
|
40
|
+
version: 0.1.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop-performance
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.9.2
|
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: 1.
|
54
|
+
version: 1.9.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '2.
|
61
|
+
version: '2.9'
|
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: '2.
|
68
|
+
version: '2.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop-rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|