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

evaluator.rules: Improve the copyleft in source rules #82

Merged
merged 3 commits into from
Nov 23, 2022

Conversation

fviernau
Copy link
Member

@fviernau fviernau commented Nov 17, 2022

See individual commits.

Context: #66.

@fviernau fviernau requested a review from a team as a code owner November 17, 2022 13:58
@@ -1071,16 +1071,9 @@ fun RuleSet.copyleftInSourceRule() = packageRule("COPYLEFT_IN_SOURCE") {
+isCopyleft()
}

val message = if (licenseSource == LicenseSource.DETECTED) {
Copy link
Member

Choose a reason for hiding this comment

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

Think we should have declared and detected licenses message here.

Copy link
Member Author

Choose a reason for hiding this comment

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

In line 1075 we have:

       "The ScanCode 'copyleft' categorized license $license was ${licenseSource.name.lowercase()} in project " +
                    "${pkg.metadata.id.toCoordinates()}.",

${licenseSource.name.lowercase()} resolved to either "declared" or "detected".
So, we have it. I believe the message fits both cases. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

So it produces

  1. The ScanCode 'copyleft' categorized license $license was declared in project $id."
  2. The ScanCode 'copyleft' categorized license $license was detected in project $id."

Note: The license source is either DECLARED or DETECTED, but never
CONCLUDED, because licenses can only be concluded for packages /
dependencies.

Signed-off-by: Frank Viernau <[email protected]>
@fviernau fviernau force-pushed the copyleft-in-source-improvements branch from 5390a52 to 1019e9b Compare November 18, 2022 19:13
@fviernau fviernau merged commit a00e617 into main Nov 23, 2022
@fviernau fviernau deleted the copyleft-in-source-improvements branch November 23, 2022 10:26
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