diff options
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b737ca9d7204..c17cbc06911f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -3037,6 +3037,14 @@ sub process { | |||
| 3037 | $comment = '..'; | 3037 | $comment = '..'; |
| 3038 | } | 3038 | } |
| 3039 | 3039 | ||
| 3040 | # check SPDX comment style for .[chsS] files | ||
| 3041 | if ($realfile =~ /\.[chsS]$/ && | ||
| 3042 | $rawline =~ /SPDX-License-Identifier:/ && | ||
| 3043 | $rawline !~ /^\+\s*\Q$comment\E\s*/) { | ||
| 3044 | WARN("SPDX_LICENSE_TAG", | ||
| 3045 | "Improper SPDX comment style for '$realfile', please use '$comment' instead\n" . $herecurr); | ||
| 3046 | } | ||
| 3047 | |||
| 3040 | if ($comment !~ /^$/ && | 3048 | if ($comment !~ /^$/ && |
| 3041 | $rawline !~ /^\+\Q$comment\E SPDX-License-Identifier: /) { | 3049 | $rawline !~ /^\+\Q$comment\E SPDX-License-Identifier: /) { |
| 3042 | WARN("SPDX_LICENSE_TAG", | 3050 | WARN("SPDX_LICENSE_TAG", |
