Skip to content

Commit

Permalink
test: Add test to exempt builtin underscore prefixes causing warning
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Apr 23, 2022
1 parent 62f1869 commit 932ebd9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/unused_locals_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ end
]])
end)

it("exempt _ENV from warning on usage with underscore prefix", function()
assert_warnings({}, [[ return function(_ENV) return type(_ENV) end ]])
end)

it("detects unused implicit self", function()
assert_warnings({
{code = "212", name = "self", self = true, line = 2, column = 11, end_column = 11}
Expand Down

0 comments on commit 932ebd9

Please sign in to comment.