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

Add a license expression validator to LicenseExpressionParser and the command line tools #91

Open
goneall opened this issue Mar 29, 2017 · 1 comment

Comments

@goneall
Copy link
Member

goneall commented Mar 29, 2017

Requested by David Wheeler for the web validation project as a feature for the online tool.

To support this, we can add a method "validate" to the class LicenseExpressionParser which would return a string with any validation error message or return null if there are no validation errors.

We could add a new command to the command line tool "VerifyLicenseExpression" which would take a string as a parameter and return back any validation errors or "VALID" if correct.

Note that you can accomplish this today by calling the parse method in the LicenseExpressionParser. If there is an invalid expression, an exception will be thrown with the exception method describing the validation error.

@pombredanne
Copy link
Member

@goneall you could also consider using https://github.com/nexB/license-expression/ that does a more extensive validation. It should not be too difficult to package this as a Jython jar for Java.

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

No branches or pull requests

2 participants