Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647269
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: checkpatch.pl false positive |
| Date | 2017-05-22 21:00 +0200 |
| Message-ID | <tK0IG-R8-17@gated-at.bofh.it> (permalink) |
| References | <tK0IG-R8-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 linux.kernel | Previous | Next | Find similar | Unroll thread
Re: checkpatch.pl false positive Joe Perches <joe@perches.com> - 2017-05-22 21:00 +0200
csiph-web