Zulip Chat Archive
Stream: mathlib4
Topic: Can't disable directory dependency linter?
David Loeffler (Apr 28 2025 at 10:02):
It seems we now have a linter that complains about imports between certain combinations of top-level directories. However, it seems to be difficult to turn it off (for development/testing purposes). If you add set_option linter.directoryDependency false
anywhere after the imports, then it doesn't work; but if you add it before the imports at the top of the file, then you get complaints from the header style
linter.
Yaël Dillies (Apr 28 2025 at 10:06):
The list of exceptions is hardcoded in docs#Mathlib.Linter.DirectoryDependency.overrideAllowedImportDirs
David Loeffler (Apr 28 2025 at 10:26):
Thanks Yael, but I'm not sure how that answers my question, which is "what's the simplest way to disable this linter locally for a single file".
Yaël Dillies (Apr 28 2025 at 10:28):
There is no way. You need to add a global exception
Last updated: May 02 2025 at 03:31 UTC