forked from Mirror/frr
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>
This commit is contained in:
parent
0d60d63f94
commit
a45b2bf4a4
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue