Zulip Chat Archive

Stream: mathlib4

Topic: References and long lines


Michael Stoll (Oct 21 2025 at 19:47):

I'm trying to add a refrerence to a Mathlib file, which looks like this:

[A. Ostrowski, *Über einige Lösungen der Funktionalgleichung φ(x)⋅φ(y)=φ(xy)* (Section 7)][ostrowski1916].

This line is over 100 characters long, and the linter flags it.

Question. Is it OK to break this into two lines (without the documentation missing the link)?
If not, should the long lines linter special-case (and thus allow) this?
Note that it seems to be doing that for hyperlinks [text](url)already.

Ruben Van de Velde (Oct 21 2025 at 19:53):

Yes, you can break

Damiano Testa (Oct 21 2025 at 20:03):

URLs are excluded because the linter silences itself when it finds http in the line. I'm not sure about publicising this too much, lest people start beginning all their lines with /-http-/ ....

Damiano Testa (Oct 21 2025 at 20:03):

As for silencing on references, this is a little trickier: there is no clear substring that identifies references (essentially) uniquely and the linter does not have an awareness of whether the exception is coming from a doc-string/comment or elsewhere.


Last updated: Dec 20 2025 at 21:32 UTC