X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fdepends_accurate.c;h=a0fe6f32a36976886ae80ef90f48bf80dfb9a887;hb=bdb8d75154d7aefe01788e5dd5adb11e3c943c11;hp=d7082fac296c68730383542dce0a82085aee03a3;hpb=d61a0d6c2c9d2b385075338665d64ae1d1bbe3dc;p=ccan diff --git a/tools/ccanlint/tests/depends_accurate.c b/tools/ccanlint/tests/depends_accurate.c index d7082fac..a0fe6f32 100644 --- a/tools/ccanlint/tests/depends_accurate.c +++ b/tools/ccanlint/tests/depends_accurate.c @@ -53,10 +53,9 @@ static bool check_dep_includes(struct manifest *m, if (has_dep(m, deps, used, mod)) continue; - /* FIXME: we can't be sure about - * conditional includes, so don't - * complain. */ - if (!li[i].cond) { + /* FIXME: we can't be sure about conditional includes, + * so don't complain (handle common case of idempotent wrap) */ + if (!li[i].cond || li[i].cond == f->idempotent_cond) { score_file_error(score, f, i+1, "%s not listed in _info", mod); ok = false; @@ -138,7 +137,7 @@ struct ccanlint depends_accurate = { .key = "depends_accurate", .name = "Module's CCAN dependencies are the only CCAN files #included", .check = check_depends_accurate, - .needs = "depends_exist test_depends_exist" + .needs = "depends_exist test_depends_exist headers_idempotent" }; REGISTER_TEST(depends_accurate);