Re: [PATCH linux-kselftest/test v6] lib/list-test: add a test for the 'list' doubly linked list

From: Joe Perches
Date: Thu Oct 31 2019 - 06:07:25 EST


On Thu, 2019-10-31 at 01:51 -0700, Brendan Higgins wrote:
> On Wed, Oct 30, 2019 at 10:18:44AM -0700, Joe Perches wrote:
> > On Wed, 2019-10-30 at 09:35 -0700, Brendan Higgins wrote:
> > > Agreed. I can see the point of not wanting to write an exception into
> > > checkpatch for every exception of it's general rules; however, it
> > > would be nice if there was a way to maybe have a special comment or
> > > something that could turn off a checkpatch error. That way, a
> > > checkpatch error/warning always means some action should be taken, and
> > > if a rule is being ignored, there is always documentation as to why.
> >
> > That couldn't work when a comment which may exist
> > in a file is out of scope of the patch context.
>
> Sorry, I don't understand exactly what you mean. Can you elaborate?

checkpatch works on patch contexts.
If the comment is not within the patch context,
checkpatch cannot ignore various test.

> static void list_test_list_for_each_prev(struct kunit *test) /* checkpatch: disable=for-each-format */

Long line, now what?