- bool tap_ok;
-
- /* Including ccan/tap is fine for tests. */
- tap_ok = (list != &m->c_files && list != &m->h_files);
-
- list_for_each(list, f, list) {
- unsigned int i;
- char **lines = get_ccan_file_lines(f);
-
- for (i = 0; lines[i]; i++) {
- char *p;
- if (lines[i][strspn(lines[i], " \t")] != '#')
- continue;
- p = strip_spaces(f, lines[i]);
- if (!strstarts(p, "#include<ccan/")
- && !strstarts(p, "#include\"ccan/"))
- continue;
- p += strlen("#include\"");
- if (!strchr(strchr(p, '/') + 1, '/'))
- continue;
- *strchr(strchr(p, '/') + 1, '/') = '\0';
- if (!has_dep(m, p, tap_ok))
- report = talloc_asprintf_append(report,
- "%s:%u:%s\n",
- f->name, i+1, lines[i]);
- }
- }
- }