Skip to content

tools/nxstyle: check alignment of statements without a leading keyword - #19934

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

tools/nxstyle: check alignment of statements without a leading keyword#19934
raiden00pl wants to merge 1 commit into
apache:masterfrom
raiden00pl:nxstyle_fixes_pr4

Conversation

@raiden00pl

Copy link
Copy Markdown
Member

Summary

Only lines beginning with a C keyword were checked, so an assignment or a call could sit at any column.

Impact

nuttx coding standard compatibility

Testing

detect wrong alignment like below:

int demo(int a, int b)
{
  int x;

  x = a + b;
    x = x * 2;                                         // <<< not detected
  printf("%d\n", x);
      printf("hello\n");                               // <<< not detecetd
  if (x > 0)
    {
      x--;
        x++;                                           // << not detected
    }

  return x;
}

@github-actions github-actions Bot added Area: Tooling Size: M The size of the change in this PR is medium 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:

Only lines beginning with a C keyword were checked, so an assignment or
a call could sit at any column.

Signed-off-by: raiden00pl <raiden00@railab.me>
Assisted-by: Claude Code
@raiden00pl
raiden00pl marked this pull request as ready for review August 24, 2026 12:13
@github-actions github-actions Bot added Size: S The size of the change in this PR is small and removed Size: M The size of the change in this PR is medium labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Tooling Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants