On 2026/06/08 18:31, Peter Maydell wrote:
On Thu, 4 Jun 2026 at 11:11, Akihiko Odaki <[email protected]> wrote:

Check more text files: Objective-C, Meson, "hx", JSON, and property
list.

Signed-off-by: Akihiko Odaki <[email protected]>

This is missing rationale. Currently checkpatch is set up
to check source code files, and the bulk of its checks are
for source code issues. Why do we want to make it also check
non-source-code files?

The intent is to check source code files. More precisely, it is intended to check manually-written text files that the generic text checks apply to.


-our $SrcFile    = qr{\.(?:(h|c)(\.inc)?|cpp|s|S|pl|py|sh)$};
+our $SrcFile =
+       qr{\.(?:(h|c|m)(\.inc)?|cpp|s|S|pl|py|sh|build|hx|in|json|plist|txt)$};

If I run checkpatch on our .hx files, I get a lot of complaints
about trailing whitespace after "\" characters. I have a vague
memory that those are deliberate, though I forget the details.
We shouldn't add a file type to this list if it's going to
produce a lot of false positives.

I found the rationale in commit 09ce5f2d6bd6 ("qemu-options.hx: Fix up the autogenerated rST"):

> rST does not like definition list entries with no actual
> definition, but it is possible to work around this by putting a
> single escaped literal space as the definition line.

So the whitespace check cannot be applied to .hx files. I'll drop .hx from the source file type list.

Regards,
Akihiko Odaki

Reply via email to