Skip to content

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

Merged
cederom merged 1 commit into
apache:masterfrom
raiden00pl:nxstyle_fixes_pr4
Aug 24, 2026
Merged

tools/nxstyle: check alignment of statements without a leading keyword#19934
cederom merged 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

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @raiden00pl :-)

@cederom
cederom merged commit c81cc02 into apache:master Aug 24, 2026
53 checks passed
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.

3 participants