rubocop-yard 0.10.0 → 1.1.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 +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +2 -1
- data/lib/rubocop/cop/yard/mismatch_name.rb +2 -1
- data/lib/rubocop/yard/plugin.rb +31 -0
- data/lib/rubocop/yard/version.rb +1 -1
- data/lib/rubocop-yard.rb +1 -3
- metadata +21 -9
- data/lib/rubocop/yard/inject.rb +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d52a54c55381be3ea917d1d52e64a36e7b2262e4758f2408c77468f5bfa09815
|
|
4
|
+
data.tar.gz: 6d9f2f8e4dcccdaba87a55596bd6741479e2238ae39657fc65638578eff173d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a2adb53a2daa313c7dfc8cbf5a238deb4904cde7783bcdab476ce823f018bed11587b33f88214587afc9f6be5723742edc2b250f8651045cb88a1851ed6a94e8
|
|
7
|
+
data.tar.gz: 0323d3765e33329d3ff345290cd3306676e4cbbf27d3c946da87627c1e98030a1591be102958e56f683131d37bbdf9cc7fe04af424dfce6db11264e105c5e1d3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.1.0] - 2026-01-29
|
|
4
|
+
|
|
5
|
+
* Fix NoMethodError when method signature includes **nil by @ksss in https://github.com/ksss/rubocop-yard/pull/39
|
|
6
|
+
* Migrate smoke tests to RSpec by @ksss in https://github.com/ksss/rubocop-yard/pull/38
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-06-21
|
|
9
|
+
|
|
10
|
+
* Use plugins instead of require by @sue445 in https://github.com/ksss/rubocop-yard/pull/34
|
|
11
|
+
|
|
12
|
+
## [0.10.0] - 2024-11-20
|
|
13
|
+
|
|
14
|
+
* Guess argument types by @ksss in https://github.com/ksss/rubocop-yard/pull/32
|
|
15
|
+
|
|
16
|
+
## [0.9.3] - 2024-01-31
|
|
17
|
+
|
|
3
18
|
- Suppress YARD warning logs
|
|
4
19
|
|
|
5
20
|
## [0.9.0] - 2023-11-28
|
data/README.md
CHANGED
|
@@ -72,7 +72,8 @@ module RuboCop
|
|
|
72
72
|
end
|
|
73
73
|
node.arguments.each do |argument|
|
|
74
74
|
next if argument.type == :blockarg
|
|
75
|
-
next if argument.
|
|
75
|
+
next if argument.type == :kwnilarg
|
|
76
|
+
next if !argument.respond_to?(:name) || argument.name.nil?
|
|
76
77
|
|
|
77
78
|
found = docstring.tags.find do |tag|
|
|
78
79
|
next unless tag.tag_name == 'param' || tag.tag_name == 'option'
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'lint_roller'
|
|
4
|
+
|
|
5
|
+
module RuboCop
|
|
6
|
+
module YARD
|
|
7
|
+
# A plugin that integrates RuboCop Performance with RuboCop's plugin system.
|
|
8
|
+
class Plugin < LintRoller::Plugin
|
|
9
|
+
def about
|
|
10
|
+
LintRoller::About.new(
|
|
11
|
+
name: 'rubocop-yard',
|
|
12
|
+
version: VERSION,
|
|
13
|
+
homepage: 'https://github.com/ksss/rubocop-yard',
|
|
14
|
+
description: 'Check yardoc format like tag type.'
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def supported?(context)
|
|
19
|
+
context.engine == :rubocop
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def rules(_context)
|
|
23
|
+
LintRoller::Rules.new(
|
|
24
|
+
type: :path,
|
|
25
|
+
config_format: :rubocop,
|
|
26
|
+
value: Pathname.new(__dir__).join('../../../config/default.yml')
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
data/lib/rubocop/yard/version.rb
CHANGED
data/lib/rubocop-yard.rb
CHANGED
metadata
CHANGED
|
@@ -1,29 +1,42 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubocop-yard
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ksss
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: lint_roller
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0'
|
|
13
26
|
- !ruby/object:Gem::Dependency
|
|
14
27
|
name: rubocop
|
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
|
16
29
|
requirements:
|
|
17
30
|
- - "~>"
|
|
18
31
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.
|
|
32
|
+
version: '1.72'
|
|
20
33
|
type: :runtime
|
|
21
34
|
prerelease: false
|
|
22
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
36
|
requirements:
|
|
24
37
|
- - "~>"
|
|
25
38
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.
|
|
39
|
+
version: '1.72'
|
|
27
40
|
- !ruby/object:Gem::Dependency
|
|
28
41
|
name: yard
|
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -61,7 +74,7 @@ files:
|
|
|
61
74
|
- lib/rubocop/cop/yard/tag_type_syntax.rb
|
|
62
75
|
- lib/rubocop/cop/yard_cops.rb
|
|
63
76
|
- lib/rubocop/yard.rb
|
|
64
|
-
- lib/rubocop/yard/
|
|
77
|
+
- lib/rubocop/yard/plugin.rb
|
|
65
78
|
- lib/rubocop/yard/version.rb
|
|
66
79
|
- sig/rubocop/yard.rbs
|
|
67
80
|
homepage: https://github.com/ksss/rubocop-yard
|
|
@@ -72,7 +85,7 @@ metadata:
|
|
|
72
85
|
source_code_uri: https://github.com/ksss/rubocop-yard
|
|
73
86
|
changelog_uri: https://github.com/ksss/rubocop-yard
|
|
74
87
|
rubygems_mfa_required: 'true'
|
|
75
|
-
|
|
88
|
+
default_lint_roller_plugin: RuboCop::YARD::Plugin
|
|
76
89
|
rdoc_options: []
|
|
77
90
|
require_paths:
|
|
78
91
|
- lib
|
|
@@ -87,8 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
87
100
|
- !ruby/object:Gem::Version
|
|
88
101
|
version: '0'
|
|
89
102
|
requirements: []
|
|
90
|
-
rubygems_version:
|
|
91
|
-
signing_key:
|
|
103
|
+
rubygems_version: 4.0.3
|
|
92
104
|
specification_version: 4
|
|
93
105
|
summary: Check yardoc format.
|
|
94
106
|
test_files: []
|
data/lib/rubocop/yard/inject.rb
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# The original code is from https://github.com/rubocop/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
|
4
|
-
# See https://github.com/rubocop/rubocop-rspec/blob/master/MIT-LICENSE.md
|
|
5
|
-
module RuboCop
|
|
6
|
-
module YARD
|
|
7
|
-
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
|
8
|
-
# bit of our configuration.
|
|
9
|
-
module Inject
|
|
10
|
-
def self.defaults!
|
|
11
|
-
path = CONFIG_DEFAULT.to_s
|
|
12
|
-
hash = ConfigLoader.send(:load_yaml_configuration, path)
|
|
13
|
-
config = Config.new(hash, path).tap(&:make_excludes_absolute)
|
|
14
|
-
puts "configuration from #{path}" if ConfigLoader.debug?
|
|
15
|
-
config = ConfigLoader.merge_with_default(config, path)
|
|
16
|
-
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|