#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
+struct ccanlint has_license;
+
static struct doc_section *find_license(const struct manifest *m)
{
struct doc_section *d;
|| 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")
|| streq(d->lines[0], "MIT"))
return "../../licenses/BSD-MIT";
return NULL;
score->score = score->total;
}
-struct ccanlint has_license = {
- .key = "has-license",
- .name = "Module has license",
+struct ccanlint license_exists = {
+ .key = "license_exists",
+ .name = "Module has License: entry in _info, and LICENSE symlink/file",
.check = check_has_license,
+ .needs = "info_exists"
};
-REGISTER_TEST(has_license, &has_info, NULL);
+REGISTER_TEST(license_exists);