#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)
{
d = find_license(m);
if (!d) {
- score->error = "No License: tag in _info";
+ score->error = talloc_strdup(score, "No License: tag in _info");
return;
}
expected = expected_link(m, d);
return;
}
if (errno == ENOENT) {
- score->error = "LICENSE does not exist";
+ 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);