Use SPDX license identifiers in go.mod and add test to enforce them#4940
Merged
Use SPDX license identifiers in go.mod and add test to enforce them#4940
Conversation
Co-authored-by: Isaac
simonfaltum
approved these changes
Apr 13, 2026
Member
|
Do we have somehow enforce this test? |
pietern
commented
Apr 13, 2026
Contributor
Author
pietern
left a comment
There was a problem hiding this comment.
@simonfaltum WDYM?
I'm adding another one that verifies that our NOTICE file is up to date. Using normalized license names makes that easier/unambigous.
Member
I was just not sure it would run as part of the automatic test suite |
Contributor
Author
|
Got it, yeah it does: Line 5 in cf6e193 |
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
go.modto use standard SPDX identifiers (e.g.Apache 2.0→Apache-2.0,BSD 3-Clause→BSD-3-Clause)MIT AND Apache-2.0forgo.yaml.in/yaml/v3(different files under different licenses)internal/build/license_test.gothat parsesgo.modwithx/mod/modfileand validates every direct dependency has a valid SPDX license commentTest plan
go test ./internal/build/ -run TestRequireSPDXLicenseCommentpassesThis pull request was AI-assisted by Isaac.