From: Rusty Russell Date: Tue, 30 Aug 2016 00:35:06 +0000 (+0930) Subject: tools/ccanlint: test_depends_accurate: catch #include of other ccan C files. X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=682b594ddb13c44fac31c07caeb287dd6bbf707b;p=ccan tools/ccanlint: test_depends_accurate: catch #include of other ccan C files. Jon sent a test patch for sha256 which "#include " without adding str/hex to testdepends. It "worked" (it wouldn't have linked with "hex.h"), but ccanlint didn't spot the dependency. Signed-off-by: Rusty Russell --- diff --git a/tools/ccanlint/tests/depends_accurate.c b/tools/ccanlint/tests/depends_accurate.c index a5061186..9ade3cba 100644 --- a/tools/ccanlint/tests/depends_accurate.c +++ b/tools/ccanlint/tests/depends_accurate.c @@ -47,7 +47,7 @@ static bool check_dep_includes(struct manifest *m, char *mod; if (!tal_strreg(f, lines[i], "^[ \t]*#[ \t]*include[ \t]*[<\"]" - "(ccan/+.+)/+[^/]+\\.h", &mod)) + "(ccan/+.+)/+[^/]+\\.[ch][\">]", &mod)) continue; if (has_dep(m, deps, used, mod))