Conversation
|
Tested this, and it seems to work Ok. I would perhaps have preferred a way to ignore 1st-party packages instead (packages in module being scanned), but this approach is more flexible, and makes this possible by ignoring module name |
|
What about this pull request? Looks really good. |
|
Any updates here? |
|
plz merge. I need this, too |
Packages beginning with the specified path will be ignored. Imported packages by ignored packages are still checked.
93f9da6 to
c33c0e6
Compare
|
Hi people, I'm a new maintainer for go-licenses now. From the number of comments and thumb ups, I can see that this is requested by a lot. My main concerns for merging this is that -- IMO, such kind of configurations likely grow in size, e.g. people may also need to override some packages with non-auto detectable licenses, so I want to make sure the current proposed argument syntax is compatible with that future use-case. To my knowledge and suggested by @drigz, viper is a good option to allow configuring from both a command line argument and a config file symmetrically. Therefore, I just want to confirm the option's array syntax is compatible with cobra and viper. |
https://go.dev/play/p/QCK8-GwWV82 I didn't noticed there is |
I'm using my branch of go-licenses for more than a year in my company's product repositories to check all external dependencies have proper license. In this kind of closed project use cases,
In open source project use cases, above with (*) may be chosen. |
|
Thanks for simplifying with StringSlice! IMO supporting a config file is out-of-scope of this PR but if needed in future, Viper should support this (judging from status of spf13/viper#200). |
Another possibility is that the license is too complex for go-licenses -- dual licenses, more than one licenses etc. So we need human intervention. This is where I think the config may grow.
Agreed with everything else! |
Bobgy
left a comment
There was a problem hiding this comment.
Thank you! The simplified PR looks great!
Only some nitpickings
Bobgy
left a comment
There was a problem hiding this comment.
Can you also add a section in https://github.com/google/go-licenses/blob/master/README.md to introduce this new feature?
|
Added a section to introduce the |
|
Also cc @wlynch, do you want to have a look? |
|
LGTM |
Fixes #88
Packages beginning with the specified path will be ignored.
Imported packages by ignored packages are still checked.
In my case, I would like to use go-licenses to check library licenses used in our product system.
--ignorewill be used to ignore internal private packages with proprietary license.