Failing to validate GPL licenses

Open
#70 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Start at licensing.validate() and reproduce the reported GPL examples, including 'LGPLv2.1', 'GPLv2', and 'GPL2'. Check how space-separated and comma-separated license values are handled; done should mean the intended GPL inputs validate consistently and comma-separated values no longer raise an invalid-character exception, subject to confirming the expected behavior.

Written by the indexing model from the issue text.

Description

licensing.validate() has 'Unknown license key(s)' error for GPL licenses, e.g. 'LGPLv2.1', 'GPLv2', 'GPL2'.

Side note: Also some images have several licenses, e.g. MIT, GPL2 and others.
When they are listed as 'MIT GPL2' for example, it's okay, validation just fails with errors ('Unknown license key(s)').
But when they are listed with commas instead - 'MIT,GPL2' it throws an exception for invalid characters.
In some cases, f.e. photon:3.0 the licenses come in this form.
The latter can be easily resolved, but I just wonder if it would be better those use-cases to be
handled within the validate method instead?

Dominant language
Python
Stars
74
Forks
38
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aboutcode-org/license-expression

All issues in aboutcode-org/license-expression

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.