gitlab-styles 2.3.2 → 2.4.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: 62b4d9e6b278468a8273fc38b8b2b831d37bc6266ebe89da7ae85588634614c7
4
- data.tar.gz: a2fd1aa98133e79043d54f3935baa5ce15b7f33f4f8c808bdebd83b81abcf79c
3
+ metadata.gz: 57a1acb3ef70890ea8910224f5060a90089a66d9081d71d11967994ef85bb84c
4
+ data.tar.gz: 23f566be54f55ce37116a9697c31b1cfff7070fad2778134ba4f0aa99ed8772e
5
5
  SHA512:
6
- metadata.gz: eb8319738228a328b912c1f7de68064ce9993002bb140eebe9c2ddcf55d07962db6213a6f0a1a8df7eb415457af782f0458c749fafef26f01896bb0d2204e5ab
7
- data.tar.gz: 973dcdb303f79786f9c615e472655a9568a3dd2fed3b48af71bf9b8408fc09568ce0e21248d20713d6eee7b080a89743cd6f2826e37e1bba55fdcb81dfede74b
6
+ metadata.gz: 10885dd2546e0d265046bd11d9cbde03f333dddbc2ae2e2ae7de1e76822186387f086658e9753a046b9875b1d0aebdcf56bacf366eef590c2986d83c04f45984
7
+ data.tar.gz: 86d7e449a1ca5789f64e13d898cbcf8460eff0547866b21ca2bc9533ec39873c17bf8ee41669dcfbf197d6162c43b53186aa948b7181aa2ec9b38d21cd8681ed
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.52.0'
8
+ gem 'rubocop', '0.54.0'
9
9
  gem 'rubocop-rspec', '1.20.1'
10
10
  end
@@ -1,4 +1,4 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'gitlab/styles/version'
4
4
 
@@ -19,7 +19,7 @@ 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.51'
22
+ spec.add_dependency 'rubocop', '~> 0.54.0'
23
23
  spec.add_dependency 'rubocop-gitlab-security', '~> 0.1.0'
24
24
  spec.add_dependency 'rubocop-rspec', '~> 1.19'
25
25
 
@@ -25,7 +25,7 @@ module Gitlab
25
25
 
26
26
  parent_klass = class_name_from_node(parent)
27
27
 
28
- return unless parent_klass && parent_klass.to_s.end_with?('Error')
28
+ return unless parent_klass&.to_s&.end_with?('Error')
29
29
 
30
30
  add_offense(node, location: :expression)
31
31
  end
@@ -1,5 +1,5 @@
1
1
  module Gitlab
2
2
  module Styles
3
- VERSION = '2.3.2'.freeze
3
+ VERSION = '2.4.0'.freeze
4
4
  end
5
5
  end
@@ -15,6 +15,10 @@ Layout/AlignHash:
15
15
  Layout/AlignParameters:
16
16
  Enabled: false
17
17
 
18
+ # Align block ends correctly.
19
+ Layout/BlockAlignment:
20
+ Enabled: true
21
+
18
22
  # Put end statement of multiline block on its own line.
19
23
  Layout/BlockEndNewline:
20
24
  Enabled: true
@@ -27,6 +31,14 @@ Layout/CaseIndentation:
27
31
  Layout/CommentIndentation:
28
32
  Enabled: true
29
33
 
34
+ # Checks for condition placed in a confusing position relative to the keyword.
35
+ Layout/ConditionPosition:
36
+ Enabled: true
37
+
38
+ # Align ends corresponding to defs correctly.
39
+ Layout/DefEndAlignment:
40
+ Enabled: true
41
+
30
42
  # Multi-line method chaining should be done with leading dots.
31
43
  Layout/DotPosition:
32
44
  Enabled: true
@@ -72,6 +84,10 @@ Layout/EmptyLinesAroundMethodBody:
72
84
  Layout/EmptyLinesAroundModuleBody:
73
85
  Enabled: true
74
86
 
87
+ # Align ends correctly.
88
+ Layout/EndAlignment:
89
+ Enabled: true
90
+
75
91
  # Use Unix-style line endings.
76
92
  Layout/EndOfLine:
77
93
  Enabled: true
@@ -18,27 +18,15 @@ Lint/AmbiguousRegexpLiteral:
18
18
  Lint/AssignmentInCondition:
19
19
  Enabled: false
20
20
 
21
- # Align block ends correctly.
22
- Lint/BlockAlignment:
23
- Enabled: true
24
-
25
21
  # Default values in optional keyword arguments and optional ordinal arguments
26
22
  # should not refer back to the name of the argument.
27
23
  Lint/CircularArgumentReference:
28
24
  Enabled: true
29
25
 
30
- # Checks for condition placed in a confusing position relative to the keyword.
31
- Lint/ConditionPosition:
32
- Enabled: true
33
-
34
26
  # Check for debugger calls.
35
27
  Lint/Debugger:
36
28
  Enabled: true
37
29
 
38
- # Align ends corresponding to defs correctly.
39
- Lint/DefEndAlignment:
40
- Enabled: true
41
-
42
30
  # Check for deprecated class method calls.
43
31
  Lint/DeprecatedClassMethods:
44
32
  Enabled: true
@@ -59,10 +47,6 @@ Lint/EmptyEnsure:
59
47
  Lint/EmptyWhen:
60
48
  Enabled: true
61
49
 
62
- # Align ends correctly.
63
- Lint/EndAlignment:
64
- Enabled: true
65
-
66
50
  # END blocks should not be placed inside method definitions.
67
51
  Lint/EndInMethod:
68
52
  Enabled: true
@@ -151,12 +135,6 @@ Lint/UnderscorePrefixedVariableName:
151
135
  Lint/UnifiedInteger:
152
136
  Enabled: true
153
137
 
154
- # Checks for rubocop:disable comments that can be removed.
155
- # Note: this cop is not disabled when disabling all cops.
156
- # It must be explicitly disabled.
157
- Lint/UnneededDisable:
158
- Enabled: false
159
-
160
138
  # This cop checks for unneeded usages of splat expansion
161
139
  Lint/UnneededSplatExpansion:
162
140
  Enabled: false
@@ -265,8 +265,13 @@ Style/StringMethods:
265
265
  Style/SymbolArray:
266
266
  Enabled: false
267
267
 
268
- # This cop checks for trailing comma in array and hash literals.
269
- Style/TrailingCommaInLiteral:
268
+ # This cop checks for trailing comma in array literals.
269
+ Style/TrailingCommaInArrayLiteral:
270
+ Enabled: true
271
+ EnforcedStyleForMultiline: no_comma
272
+
273
+ # This cop checks for trailing comma in hash literals.
274
+ Style/TrailingCommaInHashLiteral:
270
275
  Enabled: true
271
276
  EnforcedStyleForMultiline: no_comma
272
277
 
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.3.2
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2018-07-01 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.51'
19
+ version: 0.54.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.51'
26
+ version: 0.54.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-gitlab-security
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  requirements: []
165
165
  rubyforge_project:
166
- rubygems_version: 2.7.4
166
+ rubygems_version: 2.7.7
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: GitLab style guides and shared style configs.