Zulip Chat Archive
Stream: mathlib4
Topic: Disable `linter.unusedTactic` in errored proofs
Andrew Yang (Apr 22 2025 at 20:04):
Is it possible to disable linter.unusedTactic
and linter.unreachableTactic
in proofs with error? When there is an error on some line, every next line gets flagged with linter.unreachableTactic
which is unhelpful and quite distracting. The same line also gets flagged by linter.unusedTactic
which is just wrong because it did do something: create an error.
A typical example:
image.png
Aaron Liu (Apr 22 2025 at 20:04):
Probably some set_option
Andrew Yang (Apr 22 2025 at 20:06):
I would hope this could be done globally. I think remembering a magic spell and casting it whenever you want to fix some proof isn't really user friendly.
Aaron Liu (Apr 22 2025 at 20:06):
Maybe if you put it in your lakefile
Yaël Dillies (Apr 22 2025 at 20:07):
This is a v4.19.0 regression FYI
Aaron Liu (Apr 22 2025 at 20:11):
I think if you have
lean_lib Foo where
leanOptions := #[
...,
⟨`linter.unusedTactic, false⟩,
⟨`linter.unreachableTactic, false⟩,
...
]
in your lakefile it will disable it globally
Aaron Liu (Apr 22 2025 at 20:11):
(not tested)
Eric Wieser (Apr 22 2025 at 20:12):
Previously the linter would abort early if the proof reported that there was a sorry
Andrew Yang (Apr 22 2025 at 20:12):
The point is to disable it globally for errored proof only.
Eric Wieser (Apr 22 2025 at 20:13):
What you ask for is how it always behaved in older versions
Andrew Yang (May 01 2025 at 14:26):
I think lean4#8101 is meant to fix this
Last updated: May 02 2025 at 03:31 UTC