]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
ccanlint: print error information even if we pass.
[ccan] / tools / ccanlint / ccanlint.c
index 44d828bb78cb132ac9a3c5998f1949874dd93d6f..a5901ac318b8b00b0a160457e0f51d4370d32f4c 100644 (file)
@@ -149,11 +149,12 @@ static bool run_test(struct ccanlint *i,
                printf("\n");
        }
 
-       if (!quiet && !score->pass) {
+       if ((!quiet && !score->pass) || verbose) {
                struct file_error *f;
 
                if (score->error)
-                       printf("%s:\n", score->error);
+                       printf("%s%s\n", score->error,
+                              list_empty(&score->per_file_errors) ? "" : ":");
 
                list_for_each(&score->per_file_errors, f, list) {
                        if (f->line)
@@ -164,7 +165,7 @@ static bool run_test(struct ccanlint *i,
                        else
                                printf("%s\n", f->error);
                }
-               if (i->handle)
+               if (!quiet && !score->pass && i->handle)
                        i->handle(m, score);
        }