From: Joe Perches <joe@perches.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
Krzysztof Kozlowski <krzk@kernel.org>
Cc: Andy Whitcroft <apw@canonical.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: Re: [PATCH] checkpatch: Look for Kconfig indentation errors
Date: Tue, 03 Dec 2019 01:38:54 -0800 [thread overview]
Message-ID: <7d7c97b0d2aea09f32688bd6644af72b4be121d4.camel@perches.com> (raw)
In-Reply-To: <874kyhkbje.fsf@intel.com>
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: $_";'
prev parent reply other threads:[~2019-12-03 9:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 2:06 Krzysztof Kozlowski
2019-11-28 9:29 ` Jani Nikula
2019-11-28 9:34 ` Joe Perches
2019-12-03 8:40 ` Krzysztof Kozlowski
2019-12-03 8:55 ` Krzysztof Kozlowski
2019-12-03 8:56 ` Joe Perches
2019-12-03 9:23 ` Jani Nikula
2019-12-03 9:38 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d7c97b0d2aea09f32688bd6644af72b4be121d4.camel@perches.com \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=jani.nikula@linux.intel.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®