diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2023-02-10 10:47:36 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2023-02-10 10:56:07 +0100 |
| commit | a45b2bf4a455187456b00f1c43b40f667823fef4 (patch) | |
| tree | 263f831785c56cc766c1eae51bddff52b2741a7f /tools | |
| parent | 0d60d63f942ffd426b66b3f9edcd5b6893f50df7 (diff) | |
tools: allow // SPDX... in checkpatch.pl
Using // style comments for the SPDX license identifier was kind of an
intentional choice to make it stand out as "directive-like" comment (and
also to constrain it to the one line.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/checkpatch.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl index 69eb0ef954..b5892e8da5 100755 --- a/tools/checkpatch.pl +++ b/tools/checkpatch.pl @@ -3627,7 +3627,9 @@ sub process { # no C99 // comments if ($line =~ m{//}) { - if (!$allow_c99_comments) { + if ($rawlines[$linenr - 1] =~ /SPDX-License-Identifier:/) { + # ignore + } elsif (!$allow_c99_comments) { if(ERROR("C99_COMMENTS", "do not use C99 // comments\n" . $herecurr) && $fix) { |
