JianyuWang0623 commented on PR #3751:
URL: https://github.com/apache/nuttx-apps/pull/3751#issuecomment-5396018127

   ## CI failure investigation
   
   The `check` job failure (`action.c:117:4: error: Bad left brace alignment`) 
is **not caused by this PR's commits**. It is a false positive from a 
regression in `apache/nuttx`'s `tools/nxstyle` (commit `bdeb262b8d3`, 
"tools/nxstyle: indent code against its enclosing brace, not modulo 4", merged 
2026-07-27).
   
   Evidence:
   
   1. The flagged line (`system/nxinit/action.c:117`) is outside the diff of 
all 4 commits in this PR — the hunks in this PR only touch lines 223+, 315+, 
326+, 361+, 377+, 435+.
   2. Rebuilding `nxstyle` from current `apache/master` and running it against 
the **pre-PR baseline** (commit `0923948d80`, before any commit in this PR) 
reproduces the identical error on the identical line — the code this PR is 
based on already fails under the new tool.
   3. The new rule's exception for iterator/critical-section macros 
(`prevlastcode == ')' && indent == prevcodeindent + 2`) only correctly handles 
single-line macro invocations. For multi-line `list_for_every_entry(...)` calls 
where the closing `)` is on a continuation line, it computes the wrong expected 
indent and flags a false "Bad left brace alignment". This pattern is used 
throughout the codebase, e.g. `apache/nuttx`'s own `drivers/vhost/vhost.c` 
(lines 138-140, 237-239, 278-280, 346-348, 388-390, 408-410) hits the same 
false positive with the same nxstyle build.
   
   Since `tools/checkpatch.sh -g` (as invoked by CI, without `-r`) lints the 
whole file rather than just the diff range, this pre-existing false positive 
surfaces on any PR touching `action.c`, unrelated to what the PR actually 
changes.
   
   No code change is needed in this PR. Marking ready for review; CI should 
pass once the upstream `nxstyle` regression is fixed (or if maintainers choose 
to bypass/merge despite the known tool issue).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to