gitlab-styles 2.5.2 → 2.6.0

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: 5334cd2272ed29d614774e483b919bebd5c62896241e18d64b6e277c420a1dba
4
- data.tar.gz: dd3f4029decbe3834065539d6e341a558169417f4fc408706565a2a03f7641fa
3
+ metadata.gz: 4194e1fb96ce504c76fc8fc453818c3f9d97ef5bbf293756a5ba03627468da86
4
+ data.tar.gz: 367d84b2b4dfda10a7c27baef5c2563150aa14853be97ab11e35e3f838665642
5
5
  SHA512:
6
- metadata.gz: d8537ecb94f30f617052bb90aa1097d392dc70acaeba597ff9f56fb50bb87ac498527d7780a5810e954d5b8d2920e490c96c18b51dca14675eea89be81b4f93f
7
- data.tar.gz: 0f96c292047f23bf9c76b596f4c0f5d66aecfc9c7382150832fa45b9d71667e636f0f52d32db8b66cb23672115c900988aac2ad684f246439ddfc2491e1fcee3
6
+ metadata.gz: 7a3b37cf9de982ef9cc178b8b0cfc5fb587dc1ffaefb6be82cbb1cb8421f93aeaa6a340c85f4c1b13735929b1b70fe63536abc1e32ac4736e1b3d0e4ec30cae0
7
+ data.tar.gz: 603bb3c1e12eff89c8afa8876b31e0adca547f8e1d02a0541895f92b3b83a060e3b8391faf605c022345d41869036387f3937ca8d1827a0291a19250def25496
data/Gemfile CHANGED
@@ -5,6 +5,6 @@ gemspec
5
5
 
6
6
  group :test do
7
7
  # Pin these dependencies, otherwise a new rule could break the CI pipelines
8
- gem 'rubocop', '0.54.0'
8
+ gem 'rubocop', '0.68.0'
9
9
  gem 'rubocop-rspec', '1.20.1'
10
10
  end
@@ -19,8 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_dependency 'rubocop', '~> 0.54.0'
22
+ spec.add_dependency 'rubocop', '~> 0.68.0'
23
23
  spec.add_dependency 'rubocop-gitlab-security', '~> 0.1.0'
24
+ spec.add_dependency 'rubocop-performance', '~> 1.1.0'
24
25
  spec.add_dependency 'rubocop-rspec', '~> 1.19'
25
26
 
26
27
  spec.add_development_dependency 'bundler', '~> 1.16'
@@ -18,9 +18,7 @@ module Gitlab
18
18
 
19
19
  node.children.last.each_node(:pair) do |pair|
20
20
  key_name = pair.children[0].children[0].to_sym
21
- if GIT_KEYS.include?(key_name)
22
- add_offense(node, location: pair.source_range, message: MSG)
23
- end
21
+ add_offense(node, location: pair.source_range, message: MSG) if GIT_KEYS.include?(key_name)
24
22
  end
25
23
  end
26
24
 
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module Styles
3
- VERSION = '2.5.2'.freeze
3
+ VERSION = '2.6.0'.freeze
4
4
  end
5
5
  end
@@ -1,6 +1,7 @@
1
1
  require:
2
- - rubocop-rspec
3
2
  - rubocop-gitlab-security
3
+ - rubocop-performance
4
+ - rubocop-rspec
4
5
  - ./lib/gitlab/styles/rubocop
5
6
 
6
7
  inherit_from:
@@ -55,6 +55,10 @@ Lint/EndInMethod:
55
55
  Lint/EnsureReturn:
56
56
  Enabled: true
57
57
 
58
+ # Checks for flip flops.
59
+ Lint/FlipFlop:
60
+ Enabled: true
61
+
58
62
  # Catches floating-point literals too large or small for Ruby to represent.
59
63
  Lint/FloatOutOfRange:
60
64
  Enabled: true
@@ -11,10 +11,6 @@ Performance/Casecmp:
11
11
  Performance/DoubleStartEndWith:
12
12
  Enabled: true
13
13
 
14
- # Use `strip` instead of `lstrip.rstrip`.
15
- Performance/LstripRstrip:
16
- Enabled: true
17
-
18
14
  # Use `Range#cover?` instead of `Range#include?`.
19
15
  Performance/RangeInclude:
20
16
  Enabled: true
@@ -35,10 +31,6 @@ Performance/RedundantMerge:
35
31
  Enabled: true
36
32
  MaxKeyValuePairs: 1
37
33
 
38
- # Use `sort` instead of `sort_by { |x| x }`.
39
- Performance/RedundantSortBy:
40
- Enabled: true
41
-
42
34
  # Use `start_with?` instead of a regex match anchored to the beginning of a
43
35
  # string.
44
36
  Performance/StartWith:
@@ -100,10 +100,6 @@ Style/EndBlock:
100
100
  Style/EvenOdd:
101
101
  Enabled: true
102
102
 
103
- # Checks for flip flops.
104
- Style/FlipFlop:
105
- Enabled: true
106
-
107
103
  # Checks use of for or each in multiline loops.
108
104
  Style/For:
109
105
  Enabled: true
@@ -150,6 +146,10 @@ Style/InverseMethods:
150
146
  Style/LambdaCall:
151
147
  Enabled: true
152
148
 
149
+ # Use `strip` instead of `lstrip.rstrip`.
150
+ Style/Strip:
151
+ Enabled: true
152
+
153
153
  # Checks if the method definitions have or don't have parentheses.
154
154
  Style/MethodDefParentheses:
155
155
  Enabled: true
@@ -237,6 +237,10 @@ Style/RedundantException:
237
237
  Style/RedundantParentheses:
238
238
  Enabled: true
239
239
 
240
+ # Use `sort` instead of `sort_by { |x| x }`.
241
+ Style/RedundantSortBy:
242
+ Enabled: true
243
+
240
244
  # Don't use semicolons to terminate expressions.
241
245
  Style/Semicolon:
242
246
  Enabled: true
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: 2.5.2
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-10 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.54.0
19
+ version: 0.68.0
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.54.0
26
+ version: 0.68.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-gitlab-security
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.1.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rubocop-performance
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.1.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.1.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rubocop-rspec
43
57
  requirement: !ruby/object:Gem::Requirement