Re: Statistics with checkpatch.pl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13/01/2008, Paolo Ciarrocchi <paolo.ciarrocchi@xxxxxxxxx> wrote:
> On Jan 13, 2008 10:42 PM, Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:
> [...]
> > Hmm, something along the lines of this should do...
> >
> > yourscript | grep "total:" | sort --key=2 | tail -n 10
> >
>
> Not really:
> paolo@paolo-desktop:~/linux-2.6/arch/x86$ cat
> /home/paolo/Desktop/checkpatch_output.txt |grep "total:" | sort
> --key=2 | tail -n 10
> total: 8 errors, 46 warnings, 763 lines checked
> total: 8 errors, 4 warnings, 125 lines checked
> total: 97 errors, 69 warnings, 2889 lines checked
> total: 9 errors, 34 warnings, 423 lines checked
> total: 9 errors, 6 warnings, 194 lines checked
> total: 9 errors, 6 warnings, 440 lines checked
> total: 9 errors, 8 warnings, 175 lines checked
> total: 9 errors, 8 warnings, 544 lines checked
> total: 9 errors, 9 warnings, 307 lines checked
> total: 9 errors, 9 warnings, 422 lines checked
>
> Looks like sort is only looking at the first digit.
>

Yes, 'sort' does a lexicographic sort by default, to get a numeric
sort, use 'sort -n'.

I didn't test what I wrote, hence the "something along the lines of",
I assumed you could work out the details when pointed in the general
direction :-)

-- 
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux