]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
ccanlint: add is_excluded() helper.
[ccan] / tools / ccanlint / ccanlint.c
index 1c060ba7db6bf61147a8716e47dafe63c130d509..5f443d6fafd4ec4f9cbea5b62ebf054be0d92a98 100644 (file)
@@ -222,6 +222,13 @@ static struct ccanlint *find_test(const char *key)
        return NULL;
 }
 
+bool is_excluded(const char *name)
+{
+       return btree_lookup(cmdline_exclude, name) != NULL
+               || btree_lookup(info_exclude, name) != NULL
+               || find_test(name)->skip != NULL;
+}
+
 #undef REGISTER_TEST
 #define REGISTER_TEST(name, ...) extern struct ccanlint name
 #include "generated-normal-tests"