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

Dynamic license start #39

Open
HipyCas opened this issue Apr 20, 2021 · 2 comments
Open

Dynamic license start #39

HipyCas opened this issue Apr 20, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@HipyCas
Copy link
Contributor

HipyCas commented Apr 20, 2021

While working on adding a few more licenses, I stumbled across the BSD Zero Clause License, which raises some problems for the current implementation of license checking. This is the license I am talking about (from choosealicense.com):

Copyright (c) [year] [fullname]

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

The current implementation of licenses detection is by comparing the text with the start of the file, which here raises a problem. The problem with this is that the start of the license changes for every project, meaning that there is no start to check with that we call boil into the code. A possible solution for this would be, instead of checking for the start of the file, check if the file contains part of the license.

@HipyCas
Copy link
Contributor Author

HipyCas commented Apr 20, 2021

I have come again with the problem but in another license, now it is the Attribution Assurance License.

HipyCas added a commit to HipyCas/lsfp that referenced this issue Apr 20, 2021
Add 4 new licenses, by SPDX identifier: Abstyles, Adobe-2006,
Adobe-Glyph and ADSL.
With both the Abstyles and Adobe-Glyph, the SPDX site showed them as
written in the code, but in the fedora project wiki site linked in
SPDX's, they start with '%' and '#' respectively.
The ADSL license is not completely identified until the very end of the
license, providing a mostly generic text at the beginning (The-Noah#39).
@HipyCas
Copy link
Contributor Author

HipyCas commented Apr 20, 2021

Other than the dynamic start, I have come across other licenses that are not easily identified until you actually reach the end of the license, and I am not sure if their start is unique or if I may find that start on another one later on (that's the case for the ADSL).

@The-Noah The-Noah added the enhancement New feature or request label Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants