RucoCop extension that check RBS signatures
MIT License
RucoCop extension that check RBS signatures.
DISCLAIMER: this extension is an ALPHA version, it could be not 100% stable
Check for:
Please if you like it.
Know limitations: some IDEs don't update the RBS cops offenses in real-time when a change is applied because only the .rb files are actively monitored.
gem 'rubocop-rbs', '~> 0.1.1'
(and execute bundle);require:
- rubocop-rbs
bundle exec rubocop
Rbs/MethodSignature:
Exclude:
- main.rb
main.rb:7:3: C: Rbs/MethodSignature: signature error, sig/main.rbs:1:0...1:3: Syntax error: cannot start a declaration, token=def (kDEF)
def test_required_positionals(key1, key2); end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.rb:7:3: C: Rbs/MethodSignature: missing signature
def test_required_positionals(key1, key2); end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
main.rb:7:3: C: Rbs/MethodSignature: signature mismatch, expected: (untyped, untyped, untyped) -> void
def test_required_positionals(key1, key2); end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
Or consider offering me a coffee, it's a small thing but it is greatly appreciated: about me.
The gem is available as open source under the terms of the MIT License.