STYLE: Add SPDX license identifiers to all ITK source files#6084
Open
hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
Open
STYLE: Add SPDX license identifiers to all ITK source files#6084hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:mainfrom
Conversation
This was referenced Apr 18, 2026
8a49700 to
eb7085f
Compare
Member
Author
|
/azp run |
eb7085f to
f0d0acd
Compare
Contributor
|
Too many files changed for review. ( |
f0d0acd to
1dcbb3c
Compare
Prepends the two-line SPDX notice to 5,698 ITK-owned source files (.h/.hxx/.cxx/.txx/.py/.cmake/CMakeLists.txt) and updates the KWStyle template so new files are enforced going forward. // SPDX-FileCopyrightText: Copyright NumFOCUS // SPDX-License-Identifier: Apache-2.0 Applied by Utilities/Maintenance/AddSPDXHeaders.py (companion PR InsightSoftwareConsortium#5817). Modules/ThirdParty/ excluded.
1dcbb3c to
25ce5cb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepends two machine-readable SPDX lines to each of 5,698 ITK-owned source files following VTK's convention, and updates the KWStyle header template so new files are enforced to carry SPDX going forward. Pairs with #5817 (SBOM infrastructure, targets this branch); the two PRs are bound and must merge together or in strict order (this PR first, then #5817 rebased onto main).
Single commit, mechanical diff — copy-paste review.
Format (matching VTK convention)
C/C++ files (
.h,.hxx,.cxx,.txx):Python / CMake / shell files use
#-prefix equivalents. The existing 17-line Apache-2.0 notice block is unchanged.The two SPDX lines are machine-readable equivalents of the existing Apache-2.0 notice and are parseable by REUSE, scancode-toolkit, fossology, Trivy, Grype, and OSV-Scanner.
Scope — what changes in this PR
Utilities/KWStyle/ITKHeader.hgains the two SPDX lines so new files going forward are enforcedCopyright NumFOCUSare touched (ITK-owned criterion)Modules/ThirdParty/excluded — vendored projects keep upstream notices and are tracked per-module in the SBOM (#5817)Not in this PR (in #5817 instead):
Utilities/Maintenance/AddSPDXHeaders.py) used to produce this diffcheck-spdx-headers)Why these two PRs are bound
Neither PR is functional without the other:
reuse lintwould flag thousands of files. CI breaks.Merge order: this PR merges first (onto
main), then #5817 rebases onto the new main and merges. Or both merge together via a merge queue.Why — regulatory drivers (medical imaging + commercial use)
ITK's 2019 community survey documented 32% commercial users, 74% medical imaging focus. The combination makes SPDX-tagged source files and the companion SBOM a hard regulatory requirement for ITK's core audience:
Discourse evidence of real commercial-audit incidents:
#7452 (ACM-licensed
rpoly.fdiscovery), #7632 (manual license audits), #7748 (active CVE tracking).See #5817 for the full justification discussion.
Test plan — verified locally on the combined stack
pre-commit run --all-filespasses every hookreuse lintreports 0 non-ThirdParty compliance gapsspdx-toolscmake --installplaces SBOM atshare/spdx/sbom.spdx.json