X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.c;h=8aa9f2894c4aa83e053692c560b0bb6e74a5a6ea;hb=ed776b635be5cde9bcda9569789fba487f4e7cca;hp=8f36c2aa521f2d3c2132c508e367a1376fbbe2fa;hpb=eaca6b486a6714857f007950e770ac8f6b244511;p=ccan diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 8f36c2aa..8aa9f289 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -149,8 +149,9 @@ 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%s\n", score->error, @@ -164,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); }