sxs-collaboration / spectre

SpECTRE is a code for multi-scale, multi-physics problems in astrophysics and gravitational physics.
https://spectre-code.org
Other
158 stars 187 forks source link

Catch broken markdown link formatting in the commit hook #5971

Open wthrowe opened 4 months ago

wthrowe commented 4 months ago

We should check for lines ending with ] followed by lines starting with whitespace and ( in .md files, as these are probably links that got auto-formatted onto two lines, which doesn't work with doxygen. Checks requiring examining multiple lines are annoying to write, but we do it for NOLINT checks already, so something similar should be possible.

nilsdeppe commented 4 months ago

We could probably even just check for lines ending in ]. I think because that's markdown syntax, it's probably safe except in code blocks, but I don't know how common it is in those.