-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Report detected license expressions in ScanCode #74
Comments
The reporting as a license expression should be a rather straightforward addition to the license detection, since we have already all the data when we match a license RULE.
At a later stage, we can replace the list of licenses in all rules (with a one time migration script) by a plain license expression and then support more complex expressions such as (XXXX with YYY-exception) or ZZZZ At a high level, the key thing to understand is that we already match to "expression-like" rules |
The latest https://github.com/nexB/license-expression/releases/tag/v0.6 now fully supports expressions "with exceptions" and expressions using license names containing "or later". This is now good enough to be used and support the implementation of expression in ScanCode |
* this is a pre step towards support of license expressions The SPDX texts as published often contain additional notes and other additions that make these unsuitable for use as a reference license text. We want to keep only one source of truth for that and have clean texts that can also be readily usable in AttributeCode for license attribution generation. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* the rationale is that an exception can aplly to many different licenses and there is no way to enforce this sanely and consistently. * instead and to support fully license expression in #74 exceptions will be treated with a flag "is_exception" that tags them as exception. This can then be used by the license_expression library to enforce the validty of expressions thoughout. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* ensure that yml rule files have a proper name Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* this is a pre step towards support of license expressions The SPDX texts as published often contain additional notes and other additions that make these unsuitable for use as a reference license text. We want to keep only one source of truth for that and have clean texts that can also be readily usable in AttributeCode for license attribution generation. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* the rationale is that an exception can aplly to many different licenses and there is no way to enforce this sanely and consistently. * instead and to support fully license expression in #74 exceptions will be treated with a flag "is_exception" that tags them as exception. This can then be used by the license_expression library to enforce the validty of expressions thoughout. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* ensure that yml rule files have a proper name Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
The new approach is this:
|
* this is a pre step towards support of license expressions The SPDX texts as published often contain additional notes and other additions that make these unsuitable for use as a reference license text. We want to keep only one source of truth for that and have clean texts that can also be readily usable in AttributeCode for license attribution generation. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* the rationale is that an exception can aplly to many different licenses and there is no way to enforce this sanely and consistently. * instead and to support fully license expression in #74 exceptions will be treated with a flag "is_exception" that tags them as exception. This can then be used by the license_expression library to enforce the validty of expressions thoughout. Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* ensure that yml rule files have a proper name Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* Also allow to regen tests Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
There was a bug when checking expression containment Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
* use license_expression instead everywhere * streamline tests (remove negative tests that was useless and not working) Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
create a proper language-specific record too Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Add support for license expressions #74 Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
The final implemented approach is this:
This simple and more than good enough. Closing now. |
Pin Sphinx version to 6.2.1
Multiple licenses can be and are detected together when appropriate rules exist. However, even though we report these with the same detected start and end line and we know internally that they are detected together and we know if they are license choices or conjunctive licenses, we only report discrete and distinct licenses, and do not provide all these detection details.
We should return all the information that we detect, especially the interesting license choices, possibly as SPDX-style license expressions.
This is especially relevant for multiple choices that exists in Qt and similar (see #73)
The text was updated successfully, but these errors were encountered: