gitlab-styles 9.2.0 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.gitlab-ci.yml +14 -2
  3. data/.rubocop.yml +2 -1
  4. data/.rubocop_todo.yml +12 -0
  5. data/.tests_mapping.yml +10 -0
  6. data/Gemfile +9 -4
  7. data/gitlab-styles.gemspec +7 -7
  8. data/lefthook.yml +11 -3
  9. data/lib/gitlab/styles/version.rb +1 -1
  10. data/lib/rubocop/cop/active_record_dependent.rb +0 -5
  11. data/lib/rubocop/cop/active_record_serialize.rb +0 -6
  12. data/lib/rubocop/cop/avoid_return_from_blocks.rb +4 -4
  13. data/lib/rubocop/cop/gem_fetcher.rb +1 -1
  14. data/lib/rubocop/cop/gitlab_security/deep_munge.rb +36 -0
  15. data/lib/rubocop/cop/gitlab_security/json_serialization.rb +133 -0
  16. data/lib/rubocop/cop/gitlab_security/public_send.rb +47 -0
  17. data/lib/rubocop/cop/gitlab_security/redirect_to_params_update.rb +38 -0
  18. data/lib/rubocop/cop/gitlab_security/send_file_params.rb +40 -0
  19. data/lib/rubocop/cop/gitlab_security/sql_injection.rb +41 -0
  20. data/lib/rubocop/cop/gitlab_security/system_command_injection.rb +38 -0
  21. data/lib/rubocop/cop/in_batches.rb +0 -2
  22. data/lib/rubocop/cop/line_break_after_guard_clauses.rb +3 -5
  23. data/lib/rubocop/cop/migration/update_large_table.rb +1 -0
  24. data/lib/rubocop/cop/polymorphic_associations.rb +0 -5
  25. data/lib/rubocop/cop/rails/include_url_helper.rb +0 -2
  26. data/lib/rubocop/cop/redirect_with_status.rb +44 -30
  27. data/rubocop-capybara.yml +8 -0
  28. data/rubocop-default.yml +1 -1
  29. data/rubocop-layout.yml +2 -2
  30. data/rubocop-lint.yml +130 -2
  31. data/rubocop-naming.yml +5 -0
  32. data/rubocop-rails.yml +25 -0
  33. data/rubocop-rspec.yml +0 -5
  34. data/rubocop-security.yml +19 -1
  35. data/rubocop-style.yml +18 -3
  36. metadata +38 -29
  37. data/lib/gitlab/styles/rubocop/model_helpers.rb +0 -19
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: 9.2.0
4
+ version: 10.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: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,84 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.38.0
19
+ version: 1.43.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.38.0
27
- - !ruby/object:Gem::Dependency
28
- name: rubocop-gitlab-security
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.1.1
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.1.1
26
+ version: 1.43.0
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rubocop-graphql
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '0.14'
33
+ version: '0.18'
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '0.14'
40
+ version: '0.18'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rubocop-performance
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '1.14'
47
+ version: '1.15'
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '1.14'
54
+ version: '1.15'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rubocop-rails
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '2.15'
61
+ version: '2.17'
76
62
  type: :runtime
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '2.15'
68
+ version: '2.17'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rubocop-rspec
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '2.15'
75
+ version: '2.18'
90
76
  type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '2.15'
82
+ version: '2.18'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: bundler
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +114,14 @@ dependencies:
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: '10.0'
117
+ version: '13.0'
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: '10.0'
124
+ version: '13.0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: rspec
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +136,20 @@ dependencies:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
138
  version: '3.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop-rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.6'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.6'
153
153
  description:
154
154
  email:
155
155
  - gitlab_rubygems@gitlab.com
@@ -165,6 +165,8 @@ files:
165
165
  - ".gitlab/merge_request_templates/Release.md"
166
166
  - ".rspec"
167
167
  - ".rubocop.yml"
168
+ - ".rubocop_todo.yml"
169
+ - ".tests_mapping.yml"
168
170
  - CODE_OF_CONDUCT.md
169
171
  - CONTRIBUTING.md
170
172
  - Dangerfile
@@ -180,7 +182,6 @@ files:
180
182
  - lib/gitlab/styles/common/banned_constants.rb
181
183
  - lib/gitlab/styles/rubocop.rb
182
184
  - lib/gitlab/styles/rubocop/migration_helpers.rb
183
- - lib/gitlab/styles/rubocop/model_helpers.rb
184
185
  - lib/gitlab/styles/version.rb
185
186
  - lib/rubocop/cop/active_record_dependent.rb
186
187
  - lib/rubocop/cop/active_record_serialize.rb
@@ -191,6 +192,13 @@ files:
191
192
  - lib/rubocop/cop/fips/open_ssl.rb
192
193
  - lib/rubocop/cop/fips/sha1.rb
193
194
  - lib/rubocop/cop/gem_fetcher.rb
195
+ - lib/rubocop/cop/gitlab_security/deep_munge.rb
196
+ - lib/rubocop/cop/gitlab_security/json_serialization.rb
197
+ - lib/rubocop/cop/gitlab_security/public_send.rb
198
+ - lib/rubocop/cop/gitlab_security/redirect_to_params_update.rb
199
+ - lib/rubocop/cop/gitlab_security/send_file_params.rb
200
+ - lib/rubocop/cop/gitlab_security/sql_injection.rb
201
+ - lib/rubocop/cop/gitlab_security/system_command_injection.rb
194
202
  - lib/rubocop/cop/in_batches.rb
195
203
  - lib/rubocop/cop/internal_affairs/deprecate_cop_helper.rb
196
204
  - lib/rubocop/cop/line_break_after_guard_clauses.rb
@@ -212,6 +220,7 @@ files:
212
220
  - lib/rubocop/cop/without_reactive_cache.rb
213
221
  - rubocop-all.yml
214
222
  - rubocop-bundler.yml
223
+ - rubocop-capybara.yml
215
224
  - rubocop-code_reuse.yml
216
225
  - rubocop-default.yml
217
226
  - rubocop-fips.yml
@@ -1,19 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Gitlab
4
- module Styles
5
- module Rubocop
6
- module Gitlab::Styles::Rubocop::ModelHelpers
7
- # Returns true if the given node originated from the models directory.
8
- def in_model?(node)
9
- path = node.location.expression.source_buffer.name
10
- pwd = Dir.pwd
11
- models_path = File.join(pwd, 'app', 'models')
12
- ee_models_path = File.join(pwd, 'ee', 'app', 'models')
13
-
14
- path.start_with?(models_path, ee_models_path)
15
- end
16
- end
17
- end
18
- end
19
- end