#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
-struct ccanlint has_license;
+REGISTER_TEST(license_exists);
static struct doc_section *find_license(const struct manifest *m)
{
|| streq(d->lines[0], "LGPLv2 (or later)")
|| streq(d->lines[0], "LGPL (2 or any later version)"))
return "../../licenses/LGPL-2.1";
- if (streq(d->lines[0], "BSD")
- || streq(d->lines[0], "BSD-MIT")
+ if (streq(d->lines[0], "BSD-MIT")
|| streq(d->lines[0], "MIT"))
return "../../licenses/BSD-MIT";
+ if (streq(d->lines[0], "BSD (3 clause)"))
+ return "../../licenses/BSD-3CLAUSE";
return NULL;
}
score->error = talloc_strdup(score,
"LICENSE does not exist");
if (expected)
- has_license.handle = handle_license_link;
+ license_exists.handle = handle_license_link;
return;
}
err(1, "readlink on %s", license);
.check = check_has_license,
.needs = "info_exists"
};
-
-REGISTER_TEST(license_exists);