Commit 682b594d authored by Rusty Russell's avatar Rusty Russell

tools/ccanlint: test_depends_accurate: catch #include of other ccan C files.

Jon sent a test patch for sha256 which "#include <ccan/str/hex/hex.c>"
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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 3750ffaa
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment