Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647269 > unrolled thread
| Started by | Joe Perches <joe@perches.com> |
|---|---|
| First post | 2017-05-22 21:00 +0200 |
| Last post | 2017-05-22 21:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: checkpatch.pl false positive Joe Perches <joe@perches.com> - 2017-05-22 21:00 +0200
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2017-05-22 21:00 +0200 |
| Subject | Re: checkpatch.pl false positive |
| Message-ID | <tK0IG-R8-17@gated-at.bofh.it> |
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.
Back to top | Article view | linux.kernel
csiph-web