rubocop-yard 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/default.yml +5 -0
- data/lib/rubocop/cop/yard/mismatch_name.rb +26 -3
- data/lib/rubocop/yard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14068a711ba5d5d78e4781fcf5c19c0be34a5e606fad28768ea3570f0a9c044d
|
4
|
+
data.tar.gz: c2e62e57a7f060c86976d12aa4f123354e69b4a81d36ac5e6f549b9e3aa63fef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f82cc0691592cd838775d632d2f13631a1c92182afca6442ec9876dad092bea401118272ce4e1031b286466d634583f027256250bab5a6f3dfa3da2ad8eb88ce
|
7
|
+
data.tar.gz: 2a2b413001d70d1450e2ed6c9b07607f1ed82e7bf2790d1e906a272d5c940fb4434117ee75a64a5f7ff70f439c2d0d2b4b5bcd8082588569b1699d353db64d38
|
data/config/default.yml
CHANGED
@@ -102,11 +102,34 @@ module RuboCop
|
|
102
102
|
def tag_prototype(argument)
|
103
103
|
case argument.type
|
104
104
|
when :kwrestarg
|
105
|
-
|
105
|
+
case cop_config_prototype_name
|
106
|
+
when "before"
|
107
|
+
"@param #{argument.name} [Hash{Symbol => Object}]"
|
108
|
+
when "after"
|
109
|
+
"@param [Hash{Symbol => Object}] #{argument.name}"
|
110
|
+
end
|
106
111
|
when :restarg
|
107
|
-
|
112
|
+
case cop_config_prototype_name
|
113
|
+
when "before"
|
114
|
+
"@param #{argument.name} [Array<Object>]"
|
115
|
+
when "after"
|
116
|
+
"@param [Array<Object>] #{argument.name}"
|
117
|
+
end
|
108
118
|
else
|
109
|
-
|
119
|
+
case cop_config_prototype_name
|
120
|
+
when "before"
|
121
|
+
"@param #{argument.name} [Object]"
|
122
|
+
when "after"
|
123
|
+
"@param [Object] #{argument.name}"
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
def cop_config_prototype_name
|
129
|
+
@cop_config_prototype_name ||= cop_config["EnforcedStylePrototypeName"].tap do |c|
|
130
|
+
unless cop_config["SupportedStylesPrototypeName"].include?(c)
|
131
|
+
raise "unsupported style #{c}"
|
132
|
+
end
|
110
133
|
end
|
111
134
|
end
|
112
135
|
|
data/lib/rubocop/yard/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-yard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|