]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
ccanlint: fix ccanlint -l
[ccan] / tools / ccanlint / ccanlint.c
index 73a315722e7b2d3bbe434daab4906cfa12a372a4..74497d5c3d5d53f117ae73d4b74e30bf12d55b35 100644 (file)
@@ -372,6 +372,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);
@@ -712,15 +713,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];