From 056eb46d6971e89d87991f1baa7bcaaa15ec262d Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Tue, 14 May 2024 18:01:24 -0300 Subject: [PATCH] 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 --- tools/nxstyle.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/nxstyle.c b/tools/nxstyle.c index a5884c72c4..31e1ed96ac 100644 --- a/tools/nxstyle.c +++ b/tools/nxstyle.c @@ -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); + } } }