[dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper

Thomas Monjalon thomas.monjalon at 6wind.com
Thu Oct 29 14:34:32 CET 2015


2015-10-29 13:24, Bruce Richardson:
> On Thu, Oct 29, 2015 at 02:03:59PM +0100, Thomas Monjalon wrote:
> > 2015-10-29 13:33, David Marchand:
> > > On Fri, Oct 23, 2015 at 5:53 PM, Thomas Monjalon <thomas.monjalon at 6wind.com>
> > > wrote:
> > > 
> > > > +for p in "$@" ; do
> > > > +       printf -- "\n### $p\n\n"
> > > > +       report=$($DPDK_CHECKPATCH_PATH $options "$p" 2>/dev/null)
> > > > +       [ $? -ne 0 ] || continue
> > > > +       printf '%s\n' "$report" | head -n -6
> > > > +       status=$(($status + 1))
> > > > +done
> > > > +exit $status
> > > >
> > > 
> > > I prefer when checking scripts only complain when something is wrong :-)
> > > So I would only display the file name if checkpatch complains.
> > 
> > Yes I'll move the first printf after the "continue".
> 
> Ok, but perhaps instead we can get a print at the end of how many files were
> checked. I'm concerned about the case where we think we have checked something and
> it's ok, when in fact we have actually had an error in our command and e.g. not checked
> any files at all. The printing of the filename helps give a guarantee that the
> script is doing the right thing, so if it goes away, I'd hope for some other method
> to ensure that.

I agree with both of you.
I could suggest something but I'm afraid it will be difficult to have a
consensus between a "quiet tool" and a "double check verbose tool".
As it is a really critical piece of code, I think we should have a meeting
with a technical steering comittee ;)
... or we can add an option: -q or -v ? Debate is open :D



More information about the dev mailing list