|SUCCESS| [v2] devtools: fix SPDX tag check
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Thu Apr 30 22:18:32 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/163507
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-30
Reviewing the patch for DPDK coding standards and guidelines compliance.
git sha: 20260430131600.329636-1-thomas at monjalon.net
Author: Thomas Monjalon <thomas at monjalon.net>
Subject: [PATCH v2] devtools: fix SPDX tag check
This patch fixes the check-spdx-tag.sh script to handle file paths
containing slashes by replacing sed with grep.
> diff --git a/devtools/check-spdx-tag.sh b/devtools/check-spdx-tag.sh
> index 2390941c74..41fc1fe01d 100755
> --- a/devtools/check-spdx-tag.sh
> +++ b/devtools/check-spdx-tag.sh
[ ... ]
> @@ -39,10 +39,8 @@ check_spdx() {
> fi
>
> files_without_spdx=$(cat $tmpfile)
> - git grep -LE '(/\*|#|;|\.\.) *SPDX-License-Identifier: [A-Z(]' -- $no_license_list > $tmpfile
> - for file in $files_without_spdx ; do
> - sed -i "/^$file$/d" $tmpfile
> - done
> + git grep -LE '(/\*|#|;|\.\.) *SPDX-License-Identifier: [A-Z(]' -- $no_license_list |
> + grep -vF "$files_without_spdx" > $tmpfile
In the context of the check_spdx() function, when files_without_spdx
contains file paths with newlines, does this code properly handle the
comparison? If files_without_spdx contains multiple files separated by
newlines (from "cat $tmpfile"), the grep -vF command will try to match
the entire multiline string as a single pattern rather than matching
individual filenames. Could this result in no files being filtered out
when files_without_spdx contains more than one file?
Additionally, does the grep -vF matching work correctly given that the
left side of the pipe produces individual filenames line-by-line, but
the pattern on the right might be a multiline string? Should this use
grep -vxF to match whole lines, or should files_without_spdx be
processed line by line?
>
> warnings=$(($warnings + $(wc -l < $tmpfile)))
> $quiet || cat $tmpfile
More information about the test-report
mailing list