mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Do not report anonymous block arguments in Lint/UnusedArgument
This commit is contained in:
parent
4533e52aa5
commit
9df66e890b
3 changed files with 17 additions and 2 deletions
|
@ -132,6 +132,15 @@ module Ameba::Rule::Lint
|
|||
subject.catch(s).should_not be_valid
|
||||
end
|
||||
|
||||
it "doesn't report if it's an anonymous block" do
|
||||
s = Source.new %(
|
||||
def method(&)
|
||||
yield 1
|
||||
end
|
||||
)
|
||||
subject.catch(s).should be_valid
|
||||
end
|
||||
|
||||
it "doesn't report if variable is referenced implicitly" do
|
||||
s = Source.new %(
|
||||
class Bar < Foo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue