X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fhas_main_header.c;fp=tools%2Fccanlint%2Fhas_main_header.c;h=0000000000000000000000000000000000000000;hb=8f61c0bccb152b2365baf70deac1e59264d7feb7;hp=e1b711983eb8c28eeda2bb623f4c01073c2bc2be;hpb=15290c3feb9b61967311659a865fb3b5d05b1a49;p=ccan diff --git a/tools/ccanlint/has_main_header.c b/tools/ccanlint/has_main_header.c deleted file mode 100644 index e1b71198..00000000 --- a/tools/ccanlint/has_main_header.c +++ /dev/null @@ -1,41 +0,0 @@ -#include "ccanlint.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static void *check_has_main_header(struct manifest *m) -{ - struct ccan_file *f; - - list_for_each(&m->h_files, f, list) { - if (strstarts(f->name, m->basename) - && strlen(f->name) == strlen(m->basename) + 2) - return NULL; - } - return m; -} - -static const char *describe_has_main_header(struct manifest *m, - void *check_result) -{ - return talloc_asprintf(m, - "You have no %s/%s.h header file.\n\n" - "CCAN modules have a name, the same as the directory name. They're\n" - "expected to have an interface in the header of the same name.\n", - m->basename, m->basename); -} - -struct ccanlint has_main_header = { - .name = "No main header file", - .check = check_has_main_header, - .describe = describe_has_main_header, -};