rubocop-require_tools 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/rubocop/cop/require/missing_require_statement.rb +13 -0
- data/lib/rubocop/require_tools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f658c721326cca19adfdc5bb88f598822a32495bd93f10fa57a0a6f942b9c6e6
|
4
|
+
data.tar.gz: 2b62cdc0cc7526d6515e9ad2be7b7007deb32b3f262442bac9fefa88e86b81f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f44235058b0562548c5930e81976e9d1d0c0740b760b0ea23acab6bcabfe9d54a3ac741feb904df335873485d8e6afa23cf000d849c0639195834aef2f01426f
|
7
|
+
data.tar.gz: e0cc840b8ba661f2aeb39b87bb212a19b3020dae0fff1a1da0098ad9ed29c450ff676f1cbd9328dab3a9d182d5b0ce4b8fa6752df1f18aa27b2b9954c7e0f52f
|
data/Gemfile.lock
CHANGED
@@ -63,6 +63,19 @@ module RuboCop
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
def add_offense(node, location: nil, message:)
|
67
|
+
# Work around breaking API changes between rubocop 0.49.1 and later (...)
|
68
|
+
signature_old = %i[node loc message severity]
|
69
|
+
param_info = RuboCop::Cop::Cop.instance_method(:add_offense).parameters
|
70
|
+
if param_info.map(&:last) == signature_old
|
71
|
+
super(node, location || :expression, message)
|
72
|
+
elsif location
|
73
|
+
super(node, location: location, message: message)
|
74
|
+
else
|
75
|
+
super(node, message: message)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
66
79
|
def_node_matcher :extract_inner_const, <<-PATTERN
|
67
80
|
(const $!nil? _)
|
68
81
|
PATTERN
|