-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add license check #74
Conversation
Add sbt tasks that allow to check whether any dependency uses a license that is not within an allowed set of license categories. This is helpful for corporate environments where only certain licenses may be used.
@@ -36,6 +36,7 @@ object SbtLicenseReport extends AutoPlugin { | |||
val dumpLicenseReportAnyProject = taskKey[File]( | |||
"Dumps a report file against all projects of the license report (using the target language) and combines it into a single file." | |||
) | |||
val checkLicenses = taskKey[Unit]("Checks that all licenses are allowed. Fails if other licenses are found.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateLicenses
flaunts it, but generally I think we should try to name tasks with "plugin-specific-prefix + something", so I think licenseCheck
is better, like scalafmtCheck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tasks in this plugin are named "verb + noun", so this adds inconsistency, but I agree with your reasoning in general and renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LicenseCategory.MIT, | ||
LicenseCategory.Mozilla, | ||
LicenseCategory.PublicDomain | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was the LGPL
category not added to this list? AFAIK, it is allowed to ship libraries licensed under the LGPL with proprietary software.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Add sbt tasks that allow to check whether any dependency uses a license that is not within an allowed set of license categories. This is helpful for corporate environments where only certain licenses may be used. The tasks behave similar to check tasks of other set plugins, for example
scalafmtCheckAll
.