From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3D3748DA5 for ; Thu, 29 Oct 2015 14:48:19 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 29 Oct 2015 06:48:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,214,1444719600"; d="scan'208";a="590335774" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by FMSMGA003.fm.intel.com with SMTP; 29 Oct 2015 06:48:17 -0700 Received: by (sSMTP sendmail emulation); Thu, 29 Oct 2015 13:48:15 +0025 Date: Thu, 29 Oct 2015 13:48:15 +0000 From: Bruce Richardson To: Thomas Monjalon Message-ID: <20151029134815.GA15580@bricha3-MOBL3> References: <1445615606-3885-1-git-send-email-thomas.monjalon@6wind.com> <3011581.XzQahXhfO1@xps13> <20151029132430.GA13416@bricha3-MOBL3> <1916628.LyRMkppVPT@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1916628.LyRMkppVPT@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:48:19 -0000 On Thu, Oct 29, 2015 at 02:34:32PM +0100, Thomas Monjalon wrote: > 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 > > > > 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 > Yes, the whole future of the project could hinge on this decision :-) Ok, my suggestion is both! 1) Have the default (in case of no errors), be a single line print out at the end stating number of files scanned 2) If "-q" flag specified, skip this 3) If "-v" flag specified, do current behaviour with a line per file. Regards, /Bruce