Re: [PATCH v1] checkpatch: test missing initial blank line in block comment

From: Joe Perches
Date: Mon Apr 03 2017 - 15:06:50 EST


On Mon, 2017-04-03 at 10:08 +0200, Hugues Fruchet wrote:
> Warn when block comments are not starting with blank comment:
>
> /* multiple lines
> * block comment,
> * => warning
> */
>
> /*
> * multiple lines
> * block comment,
> * => no warning
> */
>
> Exception made for networking files where rule is the
> exact opposite.

I recall there was some reason I didn't do this
when adding the block comment code, but I don't
recall what it was. Perhaps it was the initial
line of files.

Maybe your $realline > 2 test fixes it. Maybe not.
Dunno.

If you run this against the entire kernel code
using a unique test type and not BLOCK_COMMENT_STYLE
are there any false positives?

Maybe test with something like:

$ git ls-files -- "*.[ch]" | \
xargs --max-args 20 ./scripts/checkpatch.pl -f --types=<your_unique_test>