Zulip Chat Archive
Stream: mathlib4
Topic: runLinter --update
Thomas Murrills (Jan 05 2026 at 18:11):
(Other aside: it looks to me like the existing runLinter --update doesn't work as intended? It just writes the declarations that failed to the nolint file. It should presumably only be writing failing declarations already in the nolints file to the nolints file, right?)
Thomas Murrills (Jan 05 2026 at 18:58):
Thomas Murrills said:
Other aside: it looks to me like the existing
runLinter --updatedoesn't work as intended?
Bryan Gin-ge Chen (Jan 05 2026 at 19:32):
I can't remember exactly, but I seem to recall that the whole point of these update commands was to allow us to easily add new violations to the nolints file. Maybe I'm missing something though.
Thomas Murrills (Jan 05 2026 at 19:35):
Hmm, so maybe the docstring is wrong? It says it “removes any declarations that no longer need to be nolinted”.
I can imagine both functionalities would be useful…!
Bryan Gin-ge Chen (Jan 05 2026 at 19:36):
Ah, now that I read your explanation in batteries#1600 I understand your point. I guess I had never considered that case, but now I can imagine there being cases where we would want one behavior or the other.
Notification Bot (Jan 05 2026 at 19:37):
4 messages were moved here from #mathlib4 > slow linting step CI? by Bryan Gin-ge Chen.
Notification Bot (Jan 05 2026 at 19:37):
A message was moved here from #mathlib4 > slow linting step CI? by Bryan Gin-ge Chen.
Thomas Murrills (Jan 05 2026 at 19:38):
So, should we have two separate flags? Or --update!, even? Happy to make a PR for whatever design we want! :)
Thomas Murrills (Jan 05 2026 at 19:39):
(Note that I think the current “add new violations” behavior would also need a tweak: currently it erases nolints that pertain to modules which are not currently being linted. Not a problem when we only ever lint the one module, but in general… :upside_down:)
Bryan Gin-ge Chen (Jan 05 2026 at 19:42):
My guess is that the only regular user of the --update option right now is this workflow that runs weekly, so my instinct would be to just document this and then move on.
However, maybe this is also used when people add new linters. Are we typically using --update to populate the nolints file then too?
Thomas Murrills (Jan 05 2026 at 19:50):
Hmm, so that workflow effectively just so happens to do a cleanup instead of adding new nolints, because CI ensures there are no new violations, right? :grinning_face_with_smiling_eyes:
Bryan Gin-ge Chen (Jan 05 2026 at 19:51):
Yep, exactly!
Thomas Murrills (Jan 05 2026 at 19:51):
Gotcha!
Last updated: Feb 28 2026 at 14:05 UTC