Repository navigation
ci: the SPDX header guard does not look at the book's CSS/JS or flake.nix - #960
Merged
Merged
Conversation
`check-spdx-headers.sh` globs `*.rs *.sh *.py *.cu *.c *.h *.ll`. Eight tracked first-party files fall outside that list and are therefore unchecked: cuda-oxide-book/_static/css/custom.css cuda-oxide-book/_static/css/lightbox.css cuda-oxide-book/_static/css/nvidia-sphinx-theme.css cuda-oxide-book/_static/js/lightbox.js cuda-oxide-book/_static/js/spa-nav.js cuda-oxide-book/_templates/footer.html cuda-oxide-book/_templates/globaltoc.html flake.nix All eight already carry the standard two-line header, so this changes no file and fails nothing today. That is exactly the hazard the guard's own header describes: the OSRB review fixed 32 files in NVIDIA#812, and the next two scripts to land (NVIDIA#819, NVIDIA#835) arrived without headers because nothing was watching that extension. The same is true here one file type over -- a new book stylesheet or template can land bare and CI stays green. CONTRIBUTING already names HTML's comment form in the header policy, so these files are in policy scope; only the guard's glob was short. Verified: the guard passes unchanged over the extended scope (1803 files, up from 1795), and stripping the header from `flake.nix` or from `_static/js/spa-nav.js` now fails the run, where before it passed. Signed-off-by: Vyncint Ng <[email protected]>
Collaborator
|
Ran the guard's regexes against all eight newly covered files:
Merging. |
nihalpasham
approved these changes
Aug 17, 2026
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.
Summary
scripts/check-spdx-headers.shglobs*.rs *.sh *.py *.cu *.c *.h *.ll. Eight tracked first-party files fall outside that list, so nothing checks their headers:All eight already carry the standard two-line header, so this changes no file and fails nothing today. That is the point: someone wrote them correctly and nothing was watching, which is precisely the hazard the guard's own header describes — the OSRB review fixed 32 files in #812, and the next two scripts to land (#819, #835) arrived bare and had to be fixed again. A new book stylesheet or Sphinx template can land the same way now and CI stays green.
These files are in policy scope, not out of it: CONTRIBUTING's "License Headers" section already names HTML's comment form. Only the guard's glob was short.
Changes
*.js *.css *.html *.nixto thegit ls-filesglob.Testing
Local, no GPU and no toolkit — this guard reads text and runs in under a second.
OK(1795 files)OK(1803 files)flake.nixOK— passederror: flake.nix: missing SPDX-FileCopyrightText line, exit 1_static/js/spa-nav.jsOK— passederror: ... spa-nav.js: missing SPDX-FileCopyrightText line, exit 1nvidia-sphinx-theme.csscarriesCopyright (c) 2023-2024, which the existing regex's optional year-range branch already accepts, and its header sits on lines 2–3 of a minified file — inside the 15-line window.check-spdx-headers.shplus the eight status-guard scripts)cargo oxide run <example>— not applicable, no code path changes