All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: linux-kernel@vger.kernel.org
Subject: Why these dot chars in scripts/checkpatch.pl?
Date: Mon, 28 Apr 2008 15:31:22 -0500	[thread overview]
Message-ID: <20080428153122.a94d21ba.pj@sgi.com> (raw)

Andy,

Perhaps I'm loosing my magic regex pixie dust, but the dot '.' char
in the pattern "/^.#" in the following lines looks wrong to me, as if
one were trying to match pre-processor directives that were set in by
one character:

The command:

	grep '^[^#].*\/\^\.#' scripts/checkpatch.pl

displays:

        if ($res =~ /^.#\s*include\s+\<(.*)\>/) {
        } elsif ($res =~ /^.#\s*(?:error|warning)\s+(.*)\b/) {
                if ($line =~ /(.*)\b((?:if|while|for|switch)\s*\(|do\b|else\b)/ && $line !~ /^.#/) {
                if ($line =~ /^.#\s*if\s+0\b/) {
                if ($line =~ /^.#\s*(ifdef|ifndef|elif)\s\s+/) {
                    $line !~ /^.#\s*if\b.*\bNR_CPUS\b/ &&
                    $line !~ /^.#\s*define\b.*\bNR_CPUS\b/ &&

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214

             reply	other threads:[~2008-04-28 20:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28 20:31 Paul Jackson [this message]
2008-04-28 20:47 ` Why these dot chars in scripts/checkpatch.pl? Rogan Dawes
2008-04-28 20:51   ` Paul Jackson
2008-04-28 22:10   ` Jan Engelhardt
2008-04-28 23:06     ` +patch " Andy Whitcroft
2008-04-29  9:51       ` Segher Boessenkool
2008-04-28 23:02 ` Andy Whitcroft

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=20080428153122.a94d21ba.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.