>>> Will Yardley wrote:

> I don't know how well clang-format works specifically, but I have found
> that using a formatting tool to force / enforce formatting solves a lot
> of time / stress about formatting, and also makes it easy to bulk-fix
> code.

+100. This is a norm in loads of projects. But this is really
applicable only if there is a CI hook that verifies real conformity,
otherwise unintentional violations will accumulate.

This hook may be applied only to files changed in a particular commit,
and explicitly excluded for files imported from other projects with a
different discipline. (A file not previously adjusted should get a
separate reformatting commit.)

> I'm not sure whether that would fly with mutt, or what the options
> available for C are; I've had good luck with tools like ruff / black for
> Python (and, of course, go has go fmt).

At least, clang-format and uncrustify are (just for me) the most
renowned actual tools.


-netch-

Reply via email to