Zulip Chat Archive

Stream: computer science

Topic: Mathlib linters in cslib


Fabrizio Montesi (Jul 23 2025 at 20:14):

Does anybody know how we can activate the linters used in mathlib using the lakefile toml format?

Damiano Testa (Jul 23 2025 at 20:22):

Under [leanOptions], adding

weak.linter.mathlibStandardSet = true

should activate all the ones that are active in mathlib.

Bhavik Mehta (Jul 23 2025 at 21:15):

What does the weak. prefix do here? I've been using linter.mathlibStandardSet = true instead

Damiano Testa (Jul 23 2025 at 21:36):

I'm not sure: what happens if you do not import the file with the standardSet option?

Eric Wieser (Jul 23 2025 at 21:38):

weak means that if the setting doesn't exist you don't get an error

Eric Wieser (Jul 23 2025 at 21:38):

e.g. if you forgot to import mathlib in a file

Bhavik Mehta (Jul 23 2025 at 21:40):

Ah! I was wondering why that happened, although I deliberately didn't import mathlib last time it happened ;)


Last updated: Dec 20 2025 at 21:32 UTC