Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whitelist licenses to not fail on #128

Closed
tknerr opened this issue Nov 7, 2017 · 7 comments
Closed

whitelist licenses to not fail on #128

tknerr opened this issue Nov 7, 2017 · 7 comments

Comments

@tknerr
Copy link

tknerr commented Nov 7, 2017

Currently you can only blacklist licenses via -failOn

However, if you want to be more strict you probably want to explicitly whitelist the licenses which are ok for you.

Ideas:

  • introduce a negation operator, e.g.: -failOn="!(MIT,Apache)"
  • introduce another flag, e.g.: -notFailOn="MIT,Apache"
@developius
Copy link

This would be really useful for a CI pipeline when checking if a commit introduces policy-breaking licensed code. 👍

@davglass
Copy link
Owner

Pushed in license-checker@16.0.0

@tknerr
Copy link
Author

tknerr commented Jan 18, 2018

@davglass awesome, thanks!

@developius
Copy link

Sweet! Thanks! Works nicely in my CI pipeline 💯

@bufferoverflow
Copy link

a fantastic feature, thank you!

@davglass
Copy link
Owner

It's not exactly perfect yet and you may have some issues. That code just does an indexOf check when it should actually be doing an spdx check like it does in other places. This will require some major changes and I didn't have time to do that :(

@developius
Copy link

@davglass funnily enough, I just ran into that issue. One of my sub-dependencies (jsonify, which is depended on by sendgrid) has a license field of "Public Domain" which I'm guessing is breaking the indexOf. Not a biggie, but would be a useful fix in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants