casaroli opened a new pull request, #21053: URL: https://github.com/apache/nuttx/pull/21053
## Summary checkpatch checks every file that a change touches, and nxstyle reports two kinds of correct lines as errors. So every change that touches one of these files fails checkpatch. `tools/nxstyle: Do not report long SPDX lines.` An `SPDX-FileCopyrightText` line keeps its copyright notice as it is and can be longer than the line width (`include/nuttx/fs/nfs.h`, `include/nuttx/net/icmpv6.h`, `include/nuttx/net/igmp.h`). nxstyle now skips the long line check for a line with an SPDX tag, as it already does for line 2 (the file path). `tools/nxstyle: Treat an unnamed enum as a data declaration.` A line with `struct` or `union` alone already starts an unnamed data declaration; `enum` alone did not. So the `#include "syscall_lookup.h"` that provides the entries of the unnamed enum in `include/sys/syscall.h` was reported as an `#include` outside of the Included Files section, while an `#include` inside an initializer is not. `enum` alone is now a data declaration too. `Documentation: Allow a long SPDX line in the coding standard.` The Line Width rule says that a line with an SPDX tag may be longer. ## Impact Only the results of nxstyle, and so of checkpatch, change: two kinds of false reports go away. No code that is built changes. ## Testing nxstyle of master and of this PR on the files concerned: | File | master | this PR | | --- | --- | --- | | `include/nuttx/fs/nfs.h` | Long line found (exit 1) | info only (exit 0) | | `include/nuttx/net/icmpv6.h` | Long line found (exit 1) | info only (exit 0) | | `include/nuttx/net/igmp.h` | 2 x Long line found (exit 1) | info only (exit 0) | | `include/sys/syscall.h` | `#include` outside of 'Included Files' section (exit 1) | no finding (exit 0) | | `arch/arm/src/lpc43xx/hardware/lpc43_spifi.h` | 3 x Mixed case identifier found | the same (no other check is relaxed) | All 46 files with an unnamed enum, before and after: only `include/sys/syscall.h` gets a different result. `tools/nxstyle.c` passes nxstyle. `tools/checkpatch.sh -c -u -m -g` passes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
