gitlab-styles 5.3.0 → 5.4.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2ceb4c3c99df5b88255a7b7bcd4cbfaa5e029f81cc73f09b937cb15b7e53ffd
|
4
|
+
data.tar.gz: e4e5a5425299c7cb3d8e40f79fb4f817444aec62c378d8c8b547a309e3fe7211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1626e2623b8e2d5bb2eeff292a4746a8352f302a53277b9118bd20494f6489501f7f19c0442510435ca55ac92cdf61536dfe5bb5c3ad09a9f3eea1b769636780
|
7
|
+
data.tar.gz: b64077d9097e0d3adb6365fe41662b6e5264921ebfa5ed493b7dec7c8eaa8dbc4ae63c286b51f34b55811664a8a8e3fa9da5aa0098840f5dfddac54c9af419b4
|
data/.rubocop.yml
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Gitlab
|
4
|
+
module Styles
|
5
|
+
module Rubocop
|
6
|
+
module Cop
|
7
|
+
module InternalAffairs
|
8
|
+
# Cop that denies the use of CopHelper.
|
9
|
+
class DeprecateCopHelper < RuboCop::Cop::Cop
|
10
|
+
MSG = 'Do not use `CopHelper` or methods from it, use improved patterns described in https://github.com/rubocop-hq/rubocop/issues/8003'
|
11
|
+
|
12
|
+
def_node_matcher :cop_helper, <<~PATTERN
|
13
|
+
(send nil? ${:include :extend :prepend}
|
14
|
+
(const _ {:CopHelper}))
|
15
|
+
PATTERN
|
16
|
+
|
17
|
+
def_node_search :cop_helper_method, <<~PATTERN
|
18
|
+
(send nil? {:inspect_source :inspect_source_file :parse_source :autocorrect_source_file :autocorrect_source :_investigate} ...)
|
19
|
+
PATTERN
|
20
|
+
|
21
|
+
def_node_search :cop_helper_method_on_instance, <<~PATTERN
|
22
|
+
(send (send nil? _) {:messages :highlights :offenses} ...)
|
23
|
+
PATTERN
|
24
|
+
|
25
|
+
def on_send(node)
|
26
|
+
cop_helper(node) do
|
27
|
+
add_offense(node)
|
28
|
+
end
|
29
|
+
|
30
|
+
cop_helper_method(node) do
|
31
|
+
add_offense(node)
|
32
|
+
end
|
33
|
+
|
34
|
+
cop_helper_method_on_instance(node) do
|
35
|
+
add_offense(node)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/rubocop-default.yml
CHANGED
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: 5.
|
4
|
+
version: 5.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:
|
11
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- lib/gitlab/styles/rubocop/cop/custom_error_class.rb
|
154
154
|
- lib/gitlab/styles/rubocop/cop/gem_fetcher.rb
|
155
155
|
- lib/gitlab/styles/rubocop/cop/in_batches.rb
|
156
|
+
- lib/gitlab/styles/rubocop/cop/internal_affairs/deprecate_cop_helper.rb
|
156
157
|
- lib/gitlab/styles/rubocop/cop/line_break_after_guard_clauses.rb
|
157
158
|
- lib/gitlab/styles/rubocop/cop/line_break_around_conditional_block.rb
|
158
159
|
- lib/gitlab/styles/rubocop/cop/migration/update_large_table.rb
|