checkpatch: checker for comment block
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | checkpatch: check for malformed comment block.scripts/ | +32 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [PATCH 0/1] checkpatch: checker for comment block
Eduardo Habkost pointed out a malformed block of comments on my patch [1] that I had ran checkpatch.pl and no warn/error was reported. Then I realized the script does not catch such as case (or it had a bug).
It turns out that checkpatch.pl does not parse comment blocks (If I understood its code correctly...). So I implemented a checker that warns about:
1. block doesn't begin on its own line.
Example:
/* blah blah
* and blah blah
*/
2. line in the block doesn't start with asterisk. Example:
/*
foo bar
bar foo
*/
Note: only the first occurence (i.e 'foo bar') is reported.
3. block doesn't end on its own line.
Example:
/*
* blah blah
* and blah */
References:
[1] https://www.mail-archive.com/[email protected]/msg580091.html
ps: last time I wrote Perl code was about 13 years ago. That remember me of good times. :)
Wainer dos Santos Moschetta (1):
checkpatch: check for malformed comment block.
scripts/checkpatch.pl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
Signature · 1 line
2.19.1