Thread View: muc.lists.freebsd.hackers
1 messages
1 total messages
Started by Enji Cooper (yaneurabeya)
Thu, 19 Nov 2026 18:24
Re: mandoc-lint-regression.sh: catch new mandoc lint warnings before you commit
Author: Enji Cooper (yaneurabeya)
Date: Thu, 19 Nov 2026 18:24
Date: Thu, 19 Nov 2026 18:24
88 lines
9333 bytes
9333 bytes
--Apple-Mail=_FE2B07B2-F428-458F-B875-3265188B1AD8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
> On Nov 19, 2026, at 3:18=E2=80=AFAM, Wolfram Schneider =
<wosch@FreeBSD.org> wrote:
>=20
> Hi,
>=20
> I wrote a script that finds new "mandoc -T lint" warnings in
> manual pages, per git commit. Running mandoc -T lint on a page with
> existing warnings does not tell you whether your change made things
> better or worse. mandoc-lint-regression.sh lints the old and the new
> version of every manual page a commit touches and reports only the
> difference: the warnings that were introduced, and the ones that were
> fixed. It is a plain /bin/sh script and needs only git, mandoc(1) and
> file(1). It works on commits, on uncommitted changes, and on a whole
> directory tree.
>=20
> Some things you can do with it, inside a freebsd-src checkout:
>=20
> # check your changes before you commit them
> mandoc-lint-regression.sh unstaged
>=20
> # your own commits of the last 90 days, as author or committer
> mandoc-lint-regression.sh -A -D 90
>=20
> # all commits of the last 7 days that touch a manual page
> mandoc-lint-regression.sh -D 7
>=20
> # which manual pages in the tree have errors? (no style messages)
> mandoc-lint-regression.sh -W error -s .
>=20
> The exit status is 1 if a new warning was introduced, so the script
> also works as a pre-commit hook ("mandoc-lint-regression.sh staged")
> and in CI. Checking all manual pages in the tree takes about 15
> seconds here.
>=20
> Download, documentation and more examples:
>=20
> https://people.freebsd.org/~wosch/src/mandoc-lint-regression/
>=20
> Feedback and bug reports are welcome.
Hi wosch@!
I=E2=80=99m game for adding this to CI (GHA) and pre-commit if =
folks find it generally useful. I=E2=80=99m working on porting over some =
things from the ATF/kyua/lutok projects to help with contributions made =
on GitHub.
Are there any plans for adding this script to ports or src?
Thank you for the help :)!
-Enji=
--Apple-Mail=_FE2B07B2-F428-458F-B875-3265188B1AD8
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmr/Ps4ACgkQGpE5DjPs
NJhecg//US4cNBSJz5oX0vWlKVILnXpeVGOQuW1VIld+WJwKdFpOEVnnatjF4Uj9
hCV+k0FixCC0fQpI9/tgeal3EeVudN8PKk1N76L7DDQ3cTgcR0qq27EFqtipHj7E
a7EJHNVtNgWzIh7IWSVPeZcsiGqOsmnRWAq1+yeoLM2pVeSOumQnVcwMde484gPD
kA53PzCpaRyBQuXnAIp8Bx8iWNAkMA0BJ39IXrpW6sm7o0TFZWVbOLJFcGRZqXum
BwGbIksbXBusizWQODctFxtrs0Z/tVyylZH9/W/G/Ms7ewzRtixplL2T8uchLOGW
sivkX5rNzMrv5Z+18gDauGVEfGe6rKhOoE4mv5YA24KVZqDeP5GNmOEoPX3mWwDT
0F502ucdnQZRdCXgXXLiZ1VfFXPDzCZMuXuRv+PekeXZBTEQIPd+H+BkxE+9tpPN
Dn1tRXvMlQJ5cLceYPZsJTxRZ+rBUHbN+M98MKW3YPzS+GJtjhVKg8QyvBJoB6cA
OgNgb6ZUteDf5Cd1CRxVLFiodDwG872BaXgDSxKbsUOTiam6gdZ/79R67stObmZB
y9Gz4s+EVa55z5CJ0sE7NMEQKpOQA8yz5M6bexiLPNxeKkV5TG0vJi7jmDgeC5Ra
Pc1GXSv5WZCOBYTIA7YDYSDvCwSBwi0V+BQGizZXGp23UVqlrRg=
=u5iY
-----END PGP SIGNATURE-----
--Apple-Mail=_FE2B07B2-F428-458F-B875-3265188B1AD8--
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads