public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Why these dot chars in scripts/checkpatch.pl?
@ 2008-04-28 20:31 Paul Jackson
  2008-04-28 20:47 ` Rogan Dawes
  2008-04-28 23:02 ` Andy Whitcroft
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Jackson @ 2008-04-28 20:31 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-29  9:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28 20:31 Why these dot chars in scripts/checkpatch.pl? Paul Jackson
2008-04-28 20:47 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox