Skip to content

scripts/checkpatch: fix SPDX-License-Identifier detection

Daniel P. Berrangé qemu-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 4 repliesIn review
  2. v49 patches 3 repliesSuperseded
  3. v39 patches 21 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v27 patches8 repliesSuperseded
v12 patches3 repliesSuperseded

Changes in v5 from the cover letter

- Actually make boilerplate text regex work, the '/x' operator culls *all* whitespace from the regex, which was not desirable as we need space between words.
- Fix inverted check of boilerplate result

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Revert "scripts: mandate that new files have SPDX-License-Identifier"scripts/checkpatch.pl+0 -300 replies
2/9scripts/checkpatch.pl: fix various indentation mistakesscripts/checkpatch.pl+49 -490 replies
3/9scripts/checkpatch: introduce tracking of file start/endscripts/checkpatch.pl+107 -30 replies
4/9scripts/checkpatch: use new hook for ACPI test data checkscripts/checkpatch.pl+29 -320 replies
5/9scripts/checkpatch: use new hook for file permissions checkscripts/checkpatch.pl+11 -80 replies
6/9scripts/checkpatch: expand pattern for matching makefilesscripts/checkpatch.pl+1 -10 replies
7/9scripts/checkpatch: use new hook for MAINTAINERS update checkscripts/checkpatch.pl+19 -180 replies
8/9scripts/checkpatch: reimplement mandate for SPDX-License-Identifierscripts/checkpatch.pl+15 -00 replies
9/9scripts/checkpatch: reject license boilerplate on new filesscripts/checkpatch.pl+23 -02 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchCédric Le GoaterPeter MaydellManos Pitsidianakis
SeriesR-b
1/9R-b R-b
2/9R-b R-b
3/9R-b R-b
4/9R-b
5/9R-b R-b
6/9R-b R-b
7/9R-b R-b
8/9T-b R-b R-b
9/9R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/9] scripts/checkpatch: fix SPDX-License-Identifier detection

This is hugely expanded an update of

https://lists.nongnu.org/archive/html/qemu-devel/2025-05/msg02040.html

In that series, Peter suggested creating standalone methods to act as hooks to call when detecting the start/end of a file in a diff.

This implements that idea and adapts a number of existing checks to use the new hooks.

Changed in v5:

- Actually make boilerplate text regex work, the '/x' operator culls *all* whitespace from the regex, which was not desirable as we need space between words.
- Fix inverted check of boilerplate result

Changed in v4:

- Pull our boilerplate match regex to separate variable
- Mention that SPDX is sufficient when reporting redundant boilerplate
- Tweak commit message to explain indent changes better

Changed in v3:

- Add check for redundent license boilerplate text
- Fix check for Makefile names

Daniel P. Berrangé (9):
Revert "scripts: mandate that new files have SPDX-License-Identifier" scripts/checkpatch.pl: fix various indentation mistakes scripts/checkpatch: introduce tracking of file start/end scripts/checkpatch: use new hook for ACPI test data check scripts/checkpatch: use new hook for file permissions check scripts/checkpatch: expand pattern for matching makefiles scripts/checkpatch: use new hook for MAINTAINERS update check scripts/checkpatch: reimplement mandate for SPDX-License-Identifier scripts/checkpatch: reject license boilerplate on new files

 scripts/checkpatch.pl | 389 +++++++++++++++++++++++++++---------------
 1 file changed, 251 insertions(+), 138 deletions(-)
Signature · 1 line
2.49.0