From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH 1/2] scripts: add checkpatch wrapper Date: Thu, 29 Oct 2015 13:24:31 +0000 Message-ID: <20151029132430.GA13416@bricha3-MOBL3> References: <1445615606-3885-1-git-send-email-thomas.monjalon@6wind.com> <1445615606-3885-2-git-send-email-thomas.monjalon@6wind.com> <3011581.XzQahXhfO1@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 48D688DAE for ; Thu, 29 Oct 2015 14:24:34 +0100 (CET) Content-Disposition: inline In-Reply-To: <3011581.XzQahXhfO1@xps13> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > > 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. /Bruce