On 2025-10-01, Christian Schulte <[email protected]> wrote:
> Hello everyone,
>
> issue pops up regularly here. When searching for tools to automatically
> (re)format a source file to match style(9), I gave up on clang-format
> and such and just provided a source file to some AI prompting it to
> "Format according to OpenBSD style(9)". The result looks promising.

You want to be really bloody careful with that. It would be really easy
for an LLM to subtly change the program code along with the formatting.
I understand this is already a bit of a problem even with simpler
tools like clang-format or indent.

> Uploading the resulting file prompting the AI to "Check formatted
> according to OpenBSD style(9)" it will not question itself, of course.
> Is there some tool available - e.g. checkstyle(9) - I can use to check a
> source file is formatted according to style(9)?

I'm not aware of any.

-- 
Please keep replies on the mailing list.

Reply via email to