[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7d7c97b0d2aea09f32688bd6644af72b4be121d4.camel@perches.com>
Date: Tue, 03 Dec 2019 01:38:54 -0800
From: Joe Perches <joe@...ches.com>
To: Jani Nikula <jani.nikula@...ux.intel.com>,
Krzysztof Kozlowski <krzk@...nel.org>
Cc: Andy Whitcroft <apw@...onical.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Subject: Re: [PATCH] checkpatch: Look for Kconfig indentation errors
On Tue, 2019-12-03 at 11:23 +0200, Jani Nikula wrote:
> Alternatively, perhaps you could complain about indentation that is not
> one of 1) empty string, 2) exactly one tab, or 3) exactly one tab
> followed by exactly two spaces?
Way too many false positives.
Try something like:
$ git grep -P -oh "^\s*\w+\b" -- '*/Kconfig*' | \
perl -p -e 'my $tabs=0;my $spaces=0;while ($_ =~ /^\s/) { if (substr($_,0,1) eq " ") { $spaces++; } else { $tabs++; } $_ = substr($_, 1); } print "tabs: $tabs spaces: $spaces: word: $_";'
Powered by blists - more mailing lists