From: Joe Perches <joe@perches.com>
To: "Antonio Niño Díaz" <antonio_nd@outlook.com>,
"apw@canonical.com" <apw@canonical.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: checkpatch.pl false positive
Date: Mon, 22 May 2017 11:52:05 -0700 [thread overview]
Message-ID: <1495479125.2093.39.camel@perches.com> (raw)
In-Reply-To: <DB6PR0901MB1173A77EA985D67344E42029F5E50@DB6PR0901MB1173.eurprd09.prod.outlook.com>
On Fri, 2017-05-19 at 09:57 +0000, Antonio Niño Díaz wrote:
> Hello,
Hi.
> I think I've hit a corner case in checkpatch.pl. It is easy to reproduce, just create a patch with a new line such as:
>
> #define MY_HEADER <header.h>
[ checkpatch outputs ]
> config.h:9: ERROR: spaces required around that '<' (ctx:WxV)
> +#define MY_HEADER <header.h> ^
> config.h:9: ERROR: spaces required around that '>' (ctx:VxE)
> +#define MY_HEADER <header.h>
Yeah, checkpatch doesn't know about the #define before the other
things
it tests.
> Will you add this as an exception, or it is not an issue for
> you as the Linux kernel doesn't really use this weird system?
Probably not as it's not a kernel usage and
I can't think of a decent way to avoid it.
maybe some substitution like
$rawline =~ s/^(\s*#\s*define\s+\w+\s+)<([^>]+>)/\1"\2"/
could help, but it's pretty obscure and probably not
used in many other projects.
Maybe you could add and keep it local to your use.
next parent reply other threads:[~2017-05-22 18:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DB6PR0901MB1173A77EA985D67344E42029F5E50@DB6PR0901MB1173.eurprd09.prod.outlook.com>
2017-05-22 18:52 ` Joe Perches [this message]
[not found] <DC148C5AA1CEBA4E87973D432B1C2D8825F13B6F@P3PWEX4MB008.ex4.secureserver.net>
2014-07-22 19:23 ` Joe Perches
2014-07-22 19:46 ` Hartley Sweeten
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=1495479125.2093.39.camel@perches.com \
--to=joe@perches.com \
--cc=antonio_nd@outlook.com \
--cc=apw@canonical.com \
--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 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®