chore(models): add SPDX-License-Identifier header to the 3 model files missing one#150
Merged
Merged
Conversation
…s missing one The project convention is to put `// SPDX-License-Identifier: Apache-2.0` on the first line of every JS source file — eases attribution for downstream forks and Apache-2.0 §4(c) re-distributors who receive a single file out of context. Of 18 model files in `app/models/`, three had been shipping without the header for months: - app/models/apikey.model.js - app/models/apimaster.model.js - app/models/customer.model.js The other 15 model files (and every other source file in app/, server.js, and tests/) had it. Add the two-line header to bring those three into compliance. New `tests/unit/spdx-headers.test.js` walks `app/`, `server.js`, and the rest of the source tree at test time, asserting that every `.js` file's first line is `// SPDX-License-Identifier: Apache-2.0`. Future copy-paste of a header-less template (or someone adding a file via a generator that doesn't know our convention) fails CI immediately rather than slipping in and being discovered by an external license-audit tool months later. 595 tests pass (was 520 + 75 new = 1 sanity-floor + ~74 per-file test.each assertions covering the source tree). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #149.
Summary
3 of 18 files in
app/models/had been shipping without the project-standard// SPDX-License-Identifier: Apache-2.0header. The other 15 model files and every other JS source file in the repo had it. Add the two-line header to bring the three into compliance:app/models/apikey.model.jsapp/models/apimaster.model.jsapp/models/customer.model.jsAdd
tests/unit/spdx-headers.test.jsthat walksapp/,server.js, and the test tree, asserting every.jsfile's first line is// SPDX-License-Identifier: Apache-2.0. Future copy-paste of a header-less template fails CI immediately rather than slipping in and surfacing months later via an external license audit.Test plan
npm run lint— cleannpm test— 595 passed (was 520 + 75 new = 1 sanity-floor + ~74 per-filetest.eachassertions covering the source tree), 15 skippedgrep -L 'SPDX-License-Identifier' app/models/*.jsreturns emptyProudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/