On 5/12/25 17:28, Peter Maydell wrote:
On Mon, 12 May 2025 at 16:18, Cédric Le Goater <c...@kaod.org> wrote:
On 5/12/25 15:52, Cédric Le Goater wrote:
On 5/8/25 12:42, Peter Maydell wrote:
The logic goes:
* when we see a "new file" line, we set expect_spdx to 1
* when we see an SPDX tag we set expect_spdx to 0
* at a later point, if we still have expect_spdx 1 we complain
The problem is that the "later point" here is "we saw another
'new file' line", not "we got to the end of all the parts of
the patch that touch this file". So if the patch adds two
new files then we'll warn for the first one (when we see the
"new file" line for the secand new file), but we won't warn
for a patch which adds only one new file (there's never a second
"new file" line) or for the last new file added in a patch
that adds multiple files.
I'm not sure where the "complain if expect_spdx is 1" check
should go, but I don't think it should be here...
yes. I just made the same observation on this patch :
https://lore.kernel.org/qemu-devel/20250509163645.33050-7-rre...@linux.ibm.com/
This seems to work well enough.
Dan sent out a patchset that overhauls the spdx detection
logic last week ("
scripts/checkpatch: fix
SPDX-License-Identifier
detection"):
https://www.mail-archive.com/qemu-devel@nongnu.org/msg1113638.html
Oh ! good, I will wait for it.
Thanks,
C.