Skip to content

tools/nxstyle: indent code against its enclosing brace, not modulo 4 - #19933

Open
raiden00pl wants to merge 1 commit into
apache:masterfrom
raiden00pl:nxstyle_fixes_pr3
Open

tools/nxstyle: indent code against its enclosing brace, not modulo 4#19933
raiden00pl wants to merge 1 commit into
apache:masterfrom
raiden00pl:nxstyle_fixes_pr3

Conversation

@raiden00pl

Copy link
Copy Markdown
Member

Summary

tools/nxstyle: indent code against its enclosing brace, not modulo 4

Impact

nuttx standard compatibility

Testing

correctly detect wrong alignment like below:

int demo(int a)
{
  switch (a)
    {
        case 1:      /* case label belongs at column 6 */
          a++;
          break;

      default:
              a--;
          break;
    }

      if (a > 0)     /* statement belongs at column 2 */
        {
          a = 0;
        }

  return a;
}

@github-actions github-actions Bot added Area: Tooling Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Aug 22, 2026
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

A residue modulo four expresses neither the indentation unit nor the
alignment of case logic, and all of it was disabled from the first
switch to the end of the enclosing function.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
@github-actions github-actions Bot added Size: M The size of the change in this PR is medium and removed Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Aug 23, 2026
@raiden00pl
raiden00pl marked this pull request as ready for review August 23, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Tooling Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants