]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
opt: fix up outdated comments in documentation.
[ccan] / tools / ccanlint / ccanlint.c
index 73a315722e7b2d3bbe434daab4906cfa12a372a4..63724d2e9c0d2fb58f1b8fc03ac7a82cedd91ccb 100644 (file)
@@ -331,6 +331,7 @@ static char *keep_test(const char *testname, void *unused)
 {
        struct ccanlint *i;
 
+       init_tests();
        if (streq(testname, "all")) {
                struct list_head *list;
                foreach_ptr(list, &compulsory_tests, &normal_tests) {
@@ -372,6 +373,7 @@ static void print_tests(struct list_head *tests, const char *type)
 
 static char *list_tests(void *arg)
 {
+       init_tests();
        print_tests(&compulsory_tests, "Compulsory");
        print_tests(&normal_tests, "Normal");
        exit(0);
@@ -402,6 +404,7 @@ static void test_dgraph_edges(struct list_head *tests)
 
 static char *test_dependency_graph(void *arg)
 {
+       init_tests();
        puts("digraph G {");
 
        test_dgraph_vertices(&compulsory_tests, ", style=filled, fillcolor=yellow");
@@ -712,15 +715,15 @@ int main(int argc, char *argv[])
        if (verbose >= 4)
                tools_verbose = true;
 
+       /* This links back to the module's test dir. */
+       testlink = talloc_asprintf(NULL, "%s/test", temp_dir(NULL));
+
        /* Defaults to pwd. */
        if (argc == 1) {
                i = 1;
                goto got_dir;
        }
 
-       /* This links back to the module's test dir. */
-       testlink = talloc_asprintf(NULL, "%s/test", temp_dir(NULL));
-
        for (i = 1; i < argc; i++) {
                unsigned int score, total_score;
                dir = argv[i];