fix(license): Correct spelling of jmhodges/clock license (#14419)

This commit is contained in:
Sven Rebhan 2023-12-08 15:28:00 +01:00 committed by GitHub
parent fbd2dcc9d9
commit 31ba5d9612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -221,7 +221,7 @@ following works:
- github.com/jeremywohl/flatten [MIT License](https://github.com/jeremywohl/flatten/blob/master/LICENSE) - github.com/jeremywohl/flatten [MIT License](https://github.com/jeremywohl/flatten/blob/master/LICENSE)
- github.com/jhump/protoreflect [Apache License 2.0](https://github.com/jhump/protoreflect/blob/master/LICENSE) - github.com/jhump/protoreflect [Apache License 2.0](https://github.com/jhump/protoreflect/blob/master/LICENSE)
- github.com/jmespath/go-jmespath [Apache License 2.0](https://github.com/jmespath/go-jmespath/blob/master/LICENSE) - github.com/jmespath/go-jmespath [Apache License 2.0](https://github.com/jmespath/go-jmespath/blob/master/LICENSE)
- github.com/jmhodges/clock [MIT Licence](https://github.com/jmhodges/clock/blob/main/LICENSE) - github.com/jmhodges/clock [MIT License](https://github.com/jmhodges/clock/blob/main/LICENSE)
- github.com/josharian/intern [MIT License](https://github.com/josharian/intern/blob/master/LICENSE.md) - github.com/josharian/intern [MIT License](https://github.com/josharian/intern/blob/master/LICENSE.md)
- github.com/josharian/native [MIT License](https://github.com/josharian/native/blob/main/license) - github.com/josharian/native [MIT License](https://github.com/josharian/native/blob/main/license)
- github.com/jpillora/backoff [MIT License](https://github.com/jpillora/backoff/blob/master/LICENSE) - github.com/jpillora/backoff [MIT License](https://github.com/jpillora/backoff/blob/master/LICENSE)

View File

@ -24,6 +24,11 @@ func (pkg *packageInfo) ToSPDX() {
} }
func (pkg *packageInfo) Classify() (float64, error) { func (pkg *packageInfo) Classify() (float64, error) {
// Check for a valid SPDX
if pkg.spdx == "" {
return 0.0, fmt.Errorf("empty SPDX for license %q", pkg.license)
}
// Download the license text // Download the license text
source, err := normalizeURL(pkg.url) source, err := normalizeURL(pkg.url)
if err != nil { if err != nil {