From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 29 Oct 2015 06:24:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,214,1444719600"; d="scan'208";a="822290229" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by fmsmga001.fm.intel.com with SMTP; 29 Oct 2015 06:24:31 -0700 Received: by (sSMTP sendmail emulation); Thu, 29 Oct 2015 13:24:31 +0025 Date: Thu, 29 Oct 2015 13:24:31 +0000 From: Bruce Richardson To: Thomas Monjalon 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 Content-Disposition: inline In-Reply-To: <3011581.XzQahXhfO1@xps13> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/2] scripts: add checkpatch wrapper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2015 13:24:34 -0000 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