go-licenses
go-licenses copied to clipboard
Check returns exit code 0 when LICENSE is not found
Expected behavior
go-licenses check
returns non-zero exit code when it cannot find a valid license so that tools/scripts can report error.
Actual behavior
Exit code 0 is returned.
$ go-licenses check github.com/daaku/go.zipexe
E0701 18:49:16.281709 29087 library.go:108] Failed to find license for github.com/daaku/go.zipexe: no file/directory matching regexp "^(LICEN(S|C)E|COPYING|README|NOTICE)(\\..+)?$" found for /Users/wlynch/go/pkg/mod/github.com/daaku/[email protected]
$ echo $?
0
The actual cause of the missing license is because go-licenses doesn't consider casing. It sounds like #30 may fix this.
You can try #30 at https://github.com/NotoriousPyro/go-licenses/tree/caseinsensitive.
I forked the code due to the requirement to 'CLA'...
#19 has tests