trento
trento copied to clipboard
Add licenses checking to the test phase of the build pipeline
Check this out: https://github.com/google/go-licenses
Also: https://github.com/frapposelli/wwhrd :D
I have tried to use google/go-licenses with no success, even the examples from the README fail to run, there are also multiple issues (including the broken examples) open. Seems like there is an effort to fix many of the issues on version 2 which is under development.
frapposelli/wwhrd works, however it requires a configuration file where you need to specify the allowed licenses, while go-licenses
uses google/licenseclassifier to automatically classify the license. Besides that, wwhrd only checks packages stored under vendor/
, so when using Go modules (go mod), you need to run go mod vendor
before running wwhrd.
While the check is being implemented using wwhrd
it might be worth keeping an eye for the next version of google/go-licenses for a solution where we do not need to maintain a list of allowed licenses.
Hey @flaviodsr! JFYI, go-licenses v2 efforts have been released as v1.1.0 with doc updated. Welcome having a try : )