perf: unused variables linter: early cut-off
This commit is contained in:
parent
2a977d8969
commit
e048bbc93a
1 changed files with 3 additions and 0 deletions
|
|
@ -151,6 +151,9 @@ opaque getUnusedVariablesIgnoreFns : CommandElabM (Array IgnoreFunction)
|
|||
|
||||
|
||||
def unusedVariables : Linter := fun cmdStx => do
|
||||
unless getLinterUnusedVariables (← getOptions) do
|
||||
return
|
||||
|
||||
-- NOTE: `messages` is local to the current command
|
||||
if (← get).messages.hasErrors then
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue