fix(lint): Lint/UnusedBlockArgument is triggered by abstract def

closes #352
This commit is contained in:
Vitalii Elenhaupt 2023-02-19 09:21:37 +02:00
parent a80672730c
commit 17e9566c7e
No known key found for this signature in database
GPG key ID: CD0BF17825928BC0
2 changed files with 9 additions and 0 deletions

View file

@ -89,6 +89,13 @@ module Ameba::Rule::Lint
CRYSTAL
end
it "doesn't report if used in abstract def" do
expect_no_issues subject, <<-CRYSTAL
abstract def debug(id : String, &on_message: Callback)
abstract def info(&on_message: Callback)
CRYSTAL
end
context "super" do
it "reports if variable is not referenced implicitly by super" do
source = expect_issue subject, <<-CRYSTAL