Commit 4d0683ea authored by Matthias Klumpp's avatar Matthias Klumpp
Browse files

validator: Don't fail when encountering WITH operator

Resolves: #261 (again)
parent bd077b84
......@@ -659,6 +659,8 @@ as_get_license_url (const gchar *license)
* the individual licenses.
*
* Returns: %TRUE if the license string contains only free-as-in-freedom licenses.
*
* Since: 0.12.10
*/
gboolean
as_license_is_free_license (const gchar *license)
......
......@@ -813,14 +813,17 @@ as_validator_validate_project_license (AsValidator *validator, xmlNode *license_
g_strcmp0 (licenses[i], "|") == 0 ||
g_strcmp0 (licenses[i], "+") == 0 ||
g_strcmp0 (licenses[i], "(") == 0 ||
g_strcmp0 (licenses[i], ")") == 0)
g_strcmp0 (licenses[i], ")") == 0 ||
g_strcmp0 (licenses[i], "^") == 0)
continue;
if (licenses[i][0] != '@' ||
!as_is_spdx_license_id (licenses[i] + 1)) {
as_validator_add_issue (validator, license_node,
"spdx-license-unknown",
licenses[i]);
return;
if (licenses[i][0] != '@') {
if (!as_is_spdx_license_id (licenses[i] + 1) && !as_is_spdx_license_exception_id (licenses[i] + 1)) {
as_validator_add_issue (validator, license_node,
"spdx-license-unknown",
licenses[i]);
return;
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment