gitlab-styles 13.0.0 → 13.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/gitlab-styles.gemspec +1 -1
- data/lib/gitlab/styles/version.rb +1 -1
- data/lib/rubocop/cop/gitlab_security/json_serialization.rb +7 -3
- data/lib/rubocop/cop/internal_affairs/cop_description_with_example.rb +0 -6
- data/rubocop-rspec.yml +5 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 260717767462cb5c7d3c94c228d8a00f9ec264a7b4a550056200349262f4c50e
|
4
|
+
data.tar.gz: 2031cf6ed85f7ea0f14fbaf475f7281c4b451af29973f258fda34f0e01360aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 390db75820765a83667b91e370513595ce74e03a7ad6c17a6a5679059d320b950401f7aa45723299e13e810db3c5c590d1c91f0a1bc13ef4d63d2fab6d92d84c
|
7
|
+
data.tar.gz: 3746d0712a9fa09def9d490862860d6bc67af3ef02c207be186ed1641b81d24734f23222256655c6296604bbf2a0d2d86d06ccb09f4f04eb606158b282004e0c
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gitlab-styles (13.0.
|
5
|
-
rubocop (~> 1.
|
4
|
+
gitlab-styles (13.0.1)
|
5
|
+
rubocop (~> 1.67.0)
|
6
6
|
rubocop-capybara (~> 2.21.0)
|
7
7
|
rubocop-factory_bot (~> 2.26.1)
|
8
8
|
rubocop-graphql (~> 1.5.4)
|
@@ -156,17 +156,17 @@ GEM
|
|
156
156
|
binding_of_caller
|
157
157
|
rspec-parameterized-core (< 2)
|
158
158
|
rspec-support (3.12.0)
|
159
|
-
rubocop (1.
|
159
|
+
rubocop (1.67.0)
|
160
160
|
json (~> 2.3)
|
161
161
|
language_server-protocol (>= 3.17.0)
|
162
162
|
parallel (~> 1.10)
|
163
163
|
parser (>= 3.3.0.2)
|
164
164
|
rainbow (>= 2.2.2, < 4.0)
|
165
165
|
regexp_parser (>= 2.4, < 3.0)
|
166
|
-
rubocop-ast (>= 1.32.
|
166
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
167
167
|
ruby-progressbar (~> 1.7)
|
168
168
|
unicode-display_width (>= 2.4.0, < 3.0)
|
169
|
-
rubocop-ast (1.32.
|
169
|
+
rubocop-ast (1.32.3)
|
170
170
|
parser (>= 3.3.1.0)
|
171
171
|
rubocop-capybara (2.21.0)
|
172
172
|
rubocop (~> 1.41)
|
data/gitlab-styles.gemspec
CHANGED
@@ -22,7 +22,7 @@ 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', '~> 1.
|
25
|
+
spec.add_dependency 'rubocop', '~> 1.67.0'
|
26
26
|
spec.add_dependency 'rubocop-capybara', '~> 2.21.0'
|
27
27
|
spec.add_dependency 'rubocop-factory_bot', '~> 2.26.1'
|
28
28
|
spec.add_dependency 'rubocop-graphql', '~> 1.5.4'
|
@@ -30,7 +30,7 @@ module RuboCop
|
|
30
30
|
# )
|
31
31
|
#
|
32
32
|
# See https://gitlab.com/gitlab-org/gitlab-ce/issues/29661
|
33
|
-
class JsonSerialization < RuboCop::Cop::
|
33
|
+
class JsonSerialization < RuboCop::Cop::Base
|
34
34
|
MSG = "Don't use `%s` without specifying `only`"
|
35
35
|
|
36
36
|
# Check for `to_json` sent to any object that's not a Hash literal or
|
@@ -72,8 +72,9 @@ module RuboCop
|
|
72
72
|
@method = matched.first
|
73
73
|
|
74
74
|
if matched.last.nil? || matched.last.empty?
|
75
|
+
@offense_found = true
|
75
76
|
# Empty `to_json` call
|
76
|
-
add_offense(node
|
77
|
+
add_offense(node.loc.selector, message: format_message)
|
77
78
|
else
|
78
79
|
check_arguments(node, matched)
|
79
80
|
end
|
@@ -102,6 +103,8 @@ module RuboCop
|
|
102
103
|
|
103
104
|
return unless requires_only?
|
104
105
|
|
106
|
+
@offense_found = true
|
107
|
+
|
105
108
|
# Add a top-level offense for the entire argument list, but only if
|
106
109
|
# we haven't yet added any offenses to the child Hash values (such
|
107
110
|
# as `include`)
|
@@ -117,6 +120,7 @@ module RuboCop
|
|
117
120
|
includes.each_child_node do |child_node|
|
118
121
|
next if contains_only?(child_node)
|
119
122
|
|
123
|
+
@offense_found = true
|
120
124
|
add_offense(child_node, message: format_message)
|
121
125
|
end
|
122
126
|
end
|
@@ -125,7 +129,7 @@ module RuboCop
|
|
125
129
|
def requires_only?
|
126
130
|
return false if @_has_top_level_only
|
127
131
|
|
128
|
-
|
132
|
+
!@offense_found
|
129
133
|
end
|
130
134
|
end
|
131
135
|
end
|
@@ -90,9 +90,3 @@ module Rubocop
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
93
|
-
|
94
|
-
# Don't match files programmatically and use `Include` directives instead.
|
95
|
-
# See https://github.com/rubocop/rubocop/pull/13209#issuecomment-2337963170
|
96
|
-
class RuboCop::Cop::InternalAffairs::CopDescription
|
97
|
-
remove_method :relevant_file? if instance_method(:relevant_file?)
|
98
|
-
end
|
data/rubocop-rspec.yml
CHANGED
@@ -68,6 +68,11 @@ RSpec/ExampleLength:
|
|
68
68
|
Enabled: false
|
69
69
|
Max: 5
|
70
70
|
|
71
|
+
# Avoid `it do` instead use `specify do`
|
72
|
+
RSpec/ExampleWithoutDescription:
|
73
|
+
Enabled: true
|
74
|
+
EnforcedStyle: single_line_only
|
75
|
+
|
71
76
|
# Do not use should when describing your tests.
|
72
77
|
RSpec/ExampleWording:
|
73
78
|
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: 13.0.
|
4
|
+
version: 13.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitLab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-16 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: 1.
|
19
|
+
version: 1.67.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: 1.
|
26
|
+
version: 1.67.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|