rubocop-rbs_inline 1.3.1 → 1.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: 70dff765f202de632ab9ce95a88018c63308179e9db1745a36019fbd9ef9bc1d
4
- data.tar.gz: f8e7aa443700c588433356685931eb7129f9587bfe7b46e1cfbf2da32a49c911
3
+ metadata.gz: 28c10d4c13563cfc463decbe536ccbb53c0dab6102fb0c3f439b0693a03e0e6b
4
+ data.tar.gz: cc3e878fd7e43ea9e5ec255c355ada40a946a39381c6dc6d66c74450bde97ad7
5
5
  SHA512:
6
- metadata.gz: 16ec889e5c2525f8d8d0fad9f4e2a18363ece050d4e1000ee2509bb2c7336dfabb6a0ee4956606fcb06e95be7f7a27ecbcefa9b7d868fd80f77b9b0445f3a909
7
- data.tar.gz: 44f8189b13d1887d8ef055b7038b2d15952d9055fa6b7d0c6c0246a62401acf88ad0a584392ea2d29b839e8ab6f708b0e5f379c7690624c5a6e3b2a40b5a9494
6
+ metadata.gz: 0bbb06a5a7217f4a9858eefba6e3dac8e07c46363c8406b47cccbda6a66eda54710dd63b34c990eca2941e41bce1a2f73565e0c2853839aacf8809388f7c031e
7
+ data.tar.gz: b4733af9878300b883cbe5e8919d914ecfa003416135e9c747bb4c22380e6d938551ff790ed6584003f17e4bea4771318beea62be91937b857d858e1cd889191
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
 
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'lint_roller'
4
+
5
+ module RuboCop
6
+ module RbsInline
7
+ # A plugin that integrates RuboCop RBS Inline with RuboCop's plugin system.
8
+ class Plugin < LintRoller::Plugin
9
+ def about
10
+ LintRoller::About.new(
11
+ name: 'rubocop-rbs_inline',
12
+ version: RuboCop::RbsInline::VERSION,
13
+ homepage: 'https://github.com/tk0miya/rubocop-rbs_inline',
14
+ description: 'rubocop-rbs_inline is a RuboCop extension that checks for RBS::Inline annotation comments ' \
15
+ 'in Ruby code.'
16
+ )
17
+ end
18
+
19
+ def supported?(context)
20
+ context.engine == :rubocop
21
+ end
22
+
23
+ def rules(_context)
24
+ project_root = Pathname.new(__dir__).join('../../../') # steep:ignore
25
+
26
+ LintRoller::Rules.new(type: :path, config_format: :rubocop, value: project_root.join('config', 'default.yml'))
27
+ end
28
+ end
29
+ end
30
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module RbsInline
5
- VERSION = '1.3.1'
5
+ VERSION = '1.4.0'
6
6
  end
7
7
  end
@@ -5,11 +5,5 @@ require_relative 'rbs_inline/version'
5
5
  module RuboCop
6
6
  module RbsInline
7
7
  class Error < StandardError; end
8
- # Your code goes here...
9
- PROJECT_ROOT = Pathname.new(__dir__ || '').parent.parent.expand_path.freeze
10
- CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
11
- CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
12
-
13
- private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
14
8
  end
15
9
  end
@@ -3,9 +3,7 @@
3
3
  require 'rubocop'
4
4
 
5
5
  require_relative 'rubocop/rbs_inline'
6
+ require_relative 'rubocop/rbs_inline/plugin'
6
7
  require_relative 'rubocop/rbs_inline/version'
7
- require_relative 'rubocop/rbs_inline/inject'
8
-
9
- RuboCop::RbsInline::Inject.defaults!
10
8
 
11
9
  require_relative 'rubocop/cop/rbs_inline_cops'
@@ -6,7 +6,7 @@ gems:
6
6
  source:
7
7
  type: git
8
8
  name: ruby/gem_rbs_collection
9
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
9
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
10
10
  remote: https://github.com/ruby/gem_rbs_collection.git
11
11
  repo_dir: gems
12
12
  - name: dbm
@@ -18,7 +18,7 @@ gems:
18
18
  source:
19
19
  type: git
20
20
  name: ruby/gem_rbs_collection
21
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
21
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
22
22
  remote: https://github.com/ruby/gem_rbs_collection.git
23
23
  repo_dir: gems
24
24
  - name: fileutils
@@ -46,7 +46,7 @@ gems:
46
46
  source:
47
47
  type: git
48
48
  name: ruby/gem_rbs_collection
49
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
49
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
50
50
  remote: https://github.com/ruby/gem_rbs_collection.git
51
51
  repo_dir: gems
52
52
  - name: parser
@@ -54,7 +54,7 @@ gems:
54
54
  source:
55
55
  type: git
56
56
  name: ruby/gem_rbs_collection
57
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
57
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
58
58
  remote: https://github.com/ruby/gem_rbs_collection.git
59
59
  repo_dir: gems
60
60
  - name: pathname
@@ -78,7 +78,7 @@ gems:
78
78
  source:
79
79
  type: git
80
80
  name: ruby/gem_rbs_collection
81
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
81
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
82
82
  remote: https://github.com/ruby/gem_rbs_collection.git
83
83
  repo_dir: gems
84
84
  - name: rake
@@ -86,15 +86,15 @@ gems:
86
86
  source:
87
87
  type: git
88
88
  name: ruby/gem_rbs_collection
89
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
89
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
90
90
  remote: https://github.com/ruby/gem_rbs_collection.git
91
91
  repo_dir: gems
92
92
  - name: rbs
93
- version: 3.8.1
93
+ version: 3.9.2
94
94
  source:
95
95
  type: rubygems
96
96
  - name: rbs-inline
97
- version: 0.10.0
97
+ version: 0.11.0
98
98
  source:
99
99
  type: rubygems
100
100
  - name: rdoc
@@ -106,7 +106,7 @@ gems:
106
106
  source:
107
107
  type: git
108
108
  name: ruby/gem_rbs_collection
109
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
109
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
110
110
  remote: https://github.com/ruby/gem_rbs_collection.git
111
111
  repo_dir: gems
112
112
  - name: rubocop
@@ -114,7 +114,7 @@ gems:
114
114
  source:
115
115
  type: git
116
116
  name: ruby/gem_rbs_collection
117
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
117
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
118
118
  remote: https://github.com/ruby/gem_rbs_collection.git
119
119
  repo_dir: gems
120
120
  - name: rubocop-ast
@@ -122,7 +122,7 @@ gems:
122
122
  source:
123
123
  type: git
124
124
  name: ruby/gem_rbs_collection
125
- revision: 95d9b83e2727af43d6dea2ffb9e9d2d350425fe9
125
+ revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
126
126
  remote: https://github.com/ruby/gem_rbs_collection.git
127
127
  repo_dir: gems
128
128
  - name: strscan
@@ -0,0 +1,16 @@
1
+ module LintRoller
2
+ class About
3
+ def initialize: (?name: String, ?version: String, ?homepage: String, ?description: String) -> void
4
+ end
5
+
6
+ class Context
7
+ attr_accessor engine: Symbol
8
+ end
9
+
10
+ class Plugin
11
+ end
12
+
13
+ class Rules
14
+ def initialize: (?type: Symbol, ?config_format: Symbol, ?value: Pathname) -> void
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ # Generated from lib/rubocop/rbs_inline/plugin.rb with RBS::Inline
2
+
3
+ module RuboCop
4
+ module RbsInline
5
+ # A plugin that integrates RuboCop RBS Inline with RuboCop's plugin system.
6
+ class Plugin < LintRoller::Plugin
7
+ def about: () -> void
8
+ def supported?: (LintRoller::Context context) -> bool
9
+ def rules: (LintRoller::Context _context) -> void
10
+ end
11
+ end
12
+ end
@@ -4,12 +4,5 @@ module RuboCop
4
4
  module RbsInline
5
5
  class Error < StandardError
6
6
  end
7
-
8
- # Your code goes here...
9
- PROJECT_ROOT: untyped
10
-
11
- CONFIG_DEFAULT: untyped
12
-
13
- CONFIG: untyped
14
7
  end
15
8
  end
metadata CHANGED
@@ -1,14 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rbs_inline
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takeshi KOMIYA
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-03-04 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
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: '1.1'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '1.1'
12
26
  - !ruby/object:Gem::Dependency
13
27
  name: rbs-inline
14
28
  requirement: !ruby/object:Gem::Requirement
@@ -29,14 +43,20 @@ dependencies:
29
43
  requirements:
30
44
  - - ">="
31
45
  - !ruby/object:Gem::Version
32
- version: '0'
46
+ version: 1.72.1
47
+ - - "<"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.0'
33
50
  type: :runtime
34
51
  prerelease: false
35
52
  version_requirements: !ruby/object:Gem::Requirement
36
53
  requirements:
37
54
  - - ">="
38
55
  - !ruby/object:Gem::Version
39
- version: '0'
56
+ version: 1.72.1
57
+ - - "<"
58
+ - !ruby/object:Gem::Version
59
+ version: '2.0'
40
60
  description: rubocop extension to check RBS annotation comments
41
61
  email:
42
62
  - i.tkomiya@gmail.com
@@ -62,10 +82,11 @@ files:
62
82
  - lib/rubocop/cop/style/rbs_inline/parameters_separator.rb
63
83
  - lib/rubocop/cop/style/rbs_inline/unmatched_annotations.rb
64
84
  - lib/rubocop/rbs_inline.rb
65
- - lib/rubocop/rbs_inline/inject.rb
85
+ - lib/rubocop/rbs_inline/plugin.rb
66
86
  - lib/rubocop/rbs_inline/version.rb
67
87
  - rbs_collection.lock.yaml
68
88
  - rbs_collection.yaml
89
+ - sig/gems/lint_roller/lint_roller.rbs
69
90
  - sig/gems/parser/parser.rbs
70
91
  - sig/gems/rubocop/rubocop.rbs
71
92
  - sig/rubocop-rbs_inline.rbs
@@ -76,7 +97,7 @@ files:
76
97
  - sig/rubocop/cop/style/rbs_inline/parameters_separator.rbs
77
98
  - sig/rubocop/cop/style/rbs_inline/unmatched_annotations.rbs
78
99
  - sig/rubocop/rbs_inline.rbs
79
- - sig/rubocop/rbs_inline/inject.rbs
100
+ - sig/rubocop/rbs_inline/plugin.rbs
80
101
  - sig/rubocop/rbs_inline/version.rbs
81
102
  homepage: https://github.com/tk0miya/rubocop-rbs_inline
82
103
  licenses:
@@ -86,6 +107,7 @@ metadata:
86
107
  source_code_uri: https://github.com/tk0miya/rubocop-rbs_inline
87
108
  changelog_uri: https://github.com/tk0miya/rubocop-rbs_inline
88
109
  rubygems_mfa_required: 'true'
110
+ default_lint_roller_plugin: RuboCop::RbsInline::Plugin
89
111
  rdoc_options: []
90
112
  require_paths:
91
113
  - lib
@@ -100,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
122
  - !ruby/object:Gem::Version
101
123
  version: '0'
102
124
  requirements: []
103
- rubygems_version: 3.6.2
125
+ rubygems_version: 3.6.7
104
126
  specification_version: 4
105
127
  summary: rubocop extension to check RBS annotation comments
106
128
  test_files: []
@@ -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 RbsInline
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) # steep:ignore
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
@@ -1,13 +0,0 @@
1
- # Generated from lib/rubocop/rbs_inline/inject.rb with RBS::Inline
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 RbsInline
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!: () -> untyped
11
- end
12
- end
13
- end