From: Rusty Russell Date: Sun, 14 Nov 2010 11:53:52 +0000 (+1030) Subject: ccanlint: only print 5 lines of output unless -vv X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=f9b11b0dffed4ee8e73c38fdb374ace75576e97e ccanlint: only print 5 lines of output unless -vv --- diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index a5901ac3..8aa9f289 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -151,6 +151,7 @@ static bool run_test(struct ccanlint *i, if ((!quiet && !score->pass) || verbose) { struct file_error *f; + unsigned int lines = 1; if (score->error) printf("%s%s\n", score->error, @@ -164,6 +165,10 @@ 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 (!quiet && !score->pass && i->handle) i->handle(m, score);