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

Add license check #74

Merged
merged 3 commits into from
Jul 26, 2023
Merged

Add license check #74

merged 3 commits into from
Jul 26, 2023

Conversation

ybasket
Copy link
Contributor

@ybasket ybasket commented Jul 25, 2023

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.

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.")
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eed3si9n eed3si9n merged commit c48a1d4 into sbt:main Jul 26, 2023
2 checks passed
LicenseCategory.MIT,
LicenseCategory.Mozilla,
LicenseCategory.PublicDomain
)
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

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

Successfully merging this pull request may close these issues.

3 participants