]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
config: add HAVE_BUILTIN_FFSLL
[ccan] / tools / ccanlint / ccanlint.c
index 44d828bb78cb132ac9a3c5998f1949874dd93d6f..8aa9f2894c4aa83e053692c560b0bb6e74a5a6ea 100644 (file)
@@ -149,11 +149,13 @@ static bool run_test(struct ccanlint *i,
                printf("\n");
        }
 
-       if (!quiet && !score->pass) {
+       if ((!quiet && !score->pass) || verbose) {
                struct file_error *f;
+               unsigned int lines = 1;
 
                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)
@@ -163,8 +165,12 @@ static bool run_test(struct ccanlint *i,
                                printf("%s:%s\n", f->file->fullname, f->error);
                        else
                                printf("%s\n", f->error);
+                       if (verbose < 2 && ++lines > 5) {
+                               printf("... more (use -vv to see them all)\n");
+                               break;
+                       }
                }
-               if (i->handle)
+               if (!quiet && !score->pass && i->handle)
                        i->handle(m, score);
        }