scripts: checkpatch: Revert SPDX license identifier checks#24921
scripts: checkpatch: Revert SPDX license identifier checks#24921stephanosio wants to merge 1 commit intozephyrproject-rtos:masterfrom
Conversation
This commit reverts the Linux-style SPDX license identifier checks that were merged as part of 5b10fac. These checks require the SPDX license identifier to be placed in the line 1, which is not the convention used by Zephyr. Moreover, the Zephyr CI checks the SPDX license identifier in a separate job, so it is not strictly necessary for the checkpatch to validate it. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
|
p.s. I marked this a hotfix because CI currently gives the following warnings and this can be both confusing and misleading for many (unless, of course, we are now enforcing the Linux-style 1st line SPDX license identifier placement): |
|
Wouldn't |
Yes, that would ignore the warning; but, why do that when we can just remove the source of it? (especially when the checks that generate the warnings are not applicable/compliant to the Zephyr coding style) AFAIU, it is not our goal to use the Linux |
|
I think it's easier to maintain |
We do that already. There are many irreconcilable differences between Linux and Zephyr and using the Linux checkpatch as is is already out of question (see |
|
Yes, I've seen that, but I understand that a patch would be useful if we change the behavior of the check (e.g. to check that Zephyr sources include SPDX tag at the expected location). If the warning is completely ignored, I think it's more maintainable to just use |
Sure, feel free to submit a PR if you would like to look into it. I will close this PR in favour of that.
Sure, it would slightly improve maintainability, but given that merging Zephyr and Linux Also, the point is that this change should not have been merged from the Linux |
|
also prefer --ignore SPDX_LICENSE_TAG, this avoid conflicts in the future when we try to sync with upstream. |
|
I wasn't aware this was going to break things, but I do believe that Zephyr's copy of checkpatch should be maintained in a way that deviations from Linux are clearly identified in the file's history. So it's good that it was added, as the decision to exclude it is documented, either by this commit removing it or by adding an ignore directive. |
https://gist.github.com/stephanosio/a721472458e052c187836c51250128c4 I already see a number of differences that would classify as "conflicts" when diffing the Linux and Zephyr But, this is ultimately up to the maintainer's choice, and I will close this PR in favour of #24930. p.s. if we intend to keep syncing with the Linux |
This commit reverts the Linux-style SPDX license identifier checks that
were merged as part of 5b10fac.
These checks require the SPDX license identifier to be placed in the
line 1, which is not the convention used by Zephyr.
Moreover, the Zephyr CI checks the SPDX license identifier in a
separate job, so it is not strictly necessary for the checkpatch to
validate it.
Signed-off-by: Stephanos Ioannidis root@stephanos.io
Superseded by #24930