Re: [PATCH] checkpatch.pl: Add SPDX license tag check

From: Rob Herring
Date: Thu Nov 09 2017 - 08:48:24 EST


On Wed, Nov 8, 2017 at 8:10 PM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> On Wed, 2017-11-08 at 19:10 -0600, Rob Herring wrote:
>> Add a check warning if SPDX-License-Identifier tags are not used in
>> newly added files.
>
> If this is to be done, and I think it's not a great idea,

Which part? SPDX tags or checking new files or just using checkpatch for this?

> there are better ways of doing this that emit this warning
> on a per-file basis instead of a per-patch.

You had mentioned using something like checkincludes.pl before. The
problem I see with that is few people run those tools. Lots of people
run checkpatch.pl. We want this to be correct when added, not after
the fact by someone else who is not the author. It fits in the
workflow, because if checkpatch doesn't catch it, then I have to in
reviews.

I do agree though that the implementation is a bit ugly given the line
by line way checkpatch works.

Rob