trento icon indicating copy to clipboard operation
trento copied to clipboard

Add licenses checking to the test phase of the build pipeline

Open stefanotorresi opened this issue 3 years ago • 3 comments

Check this out: https://github.com/google/go-licenses

stefanotorresi avatar Oct 19 '21 09:10 stefanotorresi

Also: https://github.com/frapposelli/wwhrd :D

dottorblaster avatar Oct 19 '21 09:10 dottorblaster

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.

flaviodsr avatar Jan 26 '22 11:01 flaviodsr

Hey @flaviodsr! JFYI, go-licenses v2 efforts have been released as v1.1.0 with doc updated. Welcome having a try : )

Bobgy avatar Apr 11 '22 01:04 Bobgy