nxstyle: Ignore long line for file path at line 2

This patch fixes the issue reported by PR #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>
This commit is contained in:
Alan Carvalho de Assis 2024-05-14 18:01:24 -03:00 committed by Xiang Xiao
parent 5df4925672
commit 056eb46d69

View File

@ -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);
}
}
}