[ccan] ccanlint output prettification
Rusty Russell
rusty at rustcorp.com.au
Thu Mar 24 10:05:18 EST 2011
On Tue, 22 Mar 2011 01:24:53 -0400, Joseph Adams <joeyadams3.14159 at gmail.com> wrote:
> I think it would be nice if ccanlint's output were prettier. Attached
> is a quick hack to illustrate. It prints colorized and indented
> PASS/FAIL messages, and looks like this:
>
> http://img804.imageshack.us/img804/6163/ccanlintpretty1.png
>
> Although this is a work in progress and not meant for upstream (it
> completely ignores the verbosity level), I personally have found it to
> be handy.
>
> Also, I'm thinking this is what ccanlint -v should output (currently,
> you need -vv to get the itemized output, which also prints other
> details). Printing itemized output with ccanlint (no arguments) would
> likely be annoying for small modules that don't have time-consuming
> tests. However, an animated progress indicator would be neat.
>
> Also, the output in the demo is significantly wider than 80
> characters. This could be fixed by making the descriptions shorter
> and/or omitting the test keys in the output.
>
> I plan to implement this when I have an abundance of time. In the
> mean time, thoughts?
I like it!
I've been wrestling with verbosity levels in ccanlint for a while. I
think you're right, that -s should suppress all output, that the default
should be a progress bar, and this should be -v.
Let's think about when a test fails, or doesn't get 100%. How about
this:
-s "" -v -vv
Success - - Print Print
Fail - Print Print Print
< 100% - - Print Print
Error message - - Limited All
"Limited" means truncating at 5 lines with "... -vv for more" message.
-vv would also print verbose materials, like how we constructed the
examples from Example: fragments if they failed to compile, and the gcov
output.
Above that (-vvv and -vvvv) should be for debugging ccanlint itself;
-vvv to show a one-line-per activity (eg. compiling a file), and -vvvv
should show everything (including all command output).
Thoughts?
Rusty.
More information about the ccan
mailing list