Skip to content

libs/libc: Fix the nxstyle errors in 113 files. - #20703

Merged
xiaoxiang781216 merged 2 commits into
apache:masterfrom
casaroli:libc-nxstyle
Oct 16, 2026
Merged

xiaoxiang781216 merged 2 commits into
apache:masterfrom
casaroli:libc-nxstyle

Conversation

@casaroli

Copy link
Copy Markdown
Contributor

Summary

This PR is an experiment. It fixes the nxstyle errors in 113 files in libs/libc. If the maintainers do not want this type of change, please reject or close it.

CI runs nxstyle on every changed file whole. When a file has old style errors, a small fix to that file fails the check, and the author must first correct the style of the whole file. After this PR, a change to one of these files fails the check only because of its own lines.

The changes are only whitespace, blank lines and comment layout. The C tokens of each file are the same as before. A second commit fixes the typo "occurd" in lib_creat.c, which codespell reports.

These files are not in this PR:

  • 18 libc files with nxstyle errors whose fix adds braces or splits declarations.
  • lib_libbsprintf.c: its one error is an nxstyle false positive after begin_packed_struct.
  • The locale tables (gb18030.h, big5.h, ...). They are raw musl data.

Question: NuttX has no .git-blame-ignore-revs. Do you want me to add one with this commit, so that git blame skips it? The hash can change when the PR merges, so I would add it in a separate PR after the merge.

Impact

The code does not change. Five open PRs touch 4 of these files and can need a rebase: #20691, #20693 and #18340 (lib_getaddrinfo.c), #14923 (lib_putchar.c, lib_puts.c) and #13197 (risc-v arch_elf.c). I can remove these files from this PR if you prefer.

Testing

  • A token compare of master and this branch (C tokens, without whitespace and comments) finds no difference in any of the 114 files.
  • nxstyle reports no errors in the 114 files.
  • tools/checkpatch.sh -c -u -m -g passes on the two commits.

codespell reports "occurd" in the description of creat().

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <[email protected]>
Fix the indentation, blank lines and comment layout that nxstyle
reports, so that a later change to one of these files passes the CI
check, which checks every changed file whole.

Whitespace and comments only.  The C tokens of each file are the same
as before.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <[email protected]>
@github-actions github-actions Bot added Area: OS Components OS Components issues Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Oct 16, 2026
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@xiaoxiang781216
xiaoxiang781216 merged commit b64c030 into apache:master Oct 16, 2026
48 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: OS Components OS Components issues Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants