This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8a8f2da8f61d81f1c465051a325aeb07f132a249
Author: Marco Casaroli <[email protected]>
AuthorDate: Tue Oct 27 19:49:58 2026 +0100

    tools/nxstyle: Do not report long SPDX lines.
    
    An SPDX-FileCopyrightText line carries a copyright notice that must stay
    as it is, and it can be longer than the line width.  nxstyle reported it
    as a long line, so checkpatch failed for every change that touches such
    a file, for example include/nuttx/fs/nfs.h, include/nuttx/net/icmpv6.h
    and include/nuttx/net/igmp.h.
    
    Skip the long line check for a line with an SPDX tag, as it is already
    skipped for line 2 (the file path).
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 tools/nxstyle.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/nxstyle.c b/tools/nxstyle.c
index a8f681f84dd..ba5beacda86 100644
--- a/tools/nxstyle.c
+++ b/tools/nxstyle.c
@@ -3925,6 +3925,14 @@ int main(int argc, char **argv, char **envp)
                 {
                   INFO("Skipping checking line 2: path file\n", 2, m);
                 }
+              else if (strstr(line, "SPDX-") != NULL)
+                {
+                  /* Ignore an SPDX tag line: a copyright notice must stay
+                   * as it is, even when it is longer than the line width.
+                   */
+
+                  INFO("Skipping checking an SPDX line\n", lineno, m);
+                }
               else
                 {
                   ERROR("Long line found", lineno, m);

Reply via email to