Skip lib definitions altogether

This commit is contained in:
Sijawusz Pur Rahnama 2024-01-10 01:14:03 +01:00
parent d23ad7f0ab
commit 98d5bc720a
2 changed files with 12 additions and 0 deletions

View file

@ -998,6 +998,16 @@ module Ameba::Rule::Lint
CRYSTAL
end
it "doesn't report if it's referenced in a lib" do
expect_no_issues subject, <<-CRYSTAL
lib LibFoo
struct Foo
a : Int32
end
end
CRYSTAL
end
it "doesn't report if it's referenced" do
expect_no_issues subject, <<-CRYSTAL
def foo