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

Create an optional whitelist parameter #4

Merged
merged 1 commit into from
Aug 27, 2018
Merged

Create an optional whitelist parameter #4

merged 1 commit into from
Aug 27, 2018

Conversation

tmcw
Copy link
Contributor

@tmcw tmcw commented Aug 27, 2018

Adds a whitelist parameter to the credits transform.

@tmcw tmcw requested a review from mbostock August 27, 2018 19:25
@@ -160,6 +169,15 @@ module.exports = (options = {}) => {
continue;
}
let parsedLicense = licenseObjects(parseSPDX(dependency.license));
if (whitelist) {
for (let license of flattenLicense(parsedLicense)) {
if (!whitelistSet.has(license)) {
Copy link
Member

Choose a reason for hiding this comment

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

Is this being conservative in the sense that every mentioned license has to be whitelisted? I suppose we could have a more complex logical evaluator that handles the “MIT or GPL” case? (Doesn’t seem necessary to do that, just want to understand the intent…)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the intent is for this to be very conservative - I think there could be a more complex evaluator, but MIT or GPL is sufficiently rare, and the cases where there are 'viral or non-viral' clauses might have extra conditions that we'd want to manually review.

@tmcw tmcw merged commit b65f439 into master Aug 27, 2018
@tmcw tmcw deleted the whitelist branch August 27, 2018 20:25
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.

2 participants