Skip to content

Commit

Permalink
nxstyle: Ignore long line for file path at line 2
Browse files Browse the repository at this point in the history
This patch fixes the issue reported by PR apache#12345 where the file
path existent in the second line of each source file on NuttX.

Sometimes the path could be too long and could raise a nxstyle
issue during the CI test.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
  • Loading branch information
acassis authored and xiaoxiang781216 committed May 15, 2024
1 parent 5df4925 commit 056eb46
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/nxstyle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3093,7 +3093,16 @@ int main(int argc, char **argv, char **envp)

if (m > g_maxline && !rhcomment)
{
ERROR("Long line found", lineno, m);
/* Ignore the line 2 (file path) */

if (lineno == 2)
{
INFO("Skipping checking line 2: path file\n", 2, m);
}
else
{
ERROR("Long line found", lineno, m);
}
}
}

Expand Down

0 comments on commit 056eb46

Please sign in to comment.