aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <[email protected]>2020-04-06 20:10:51 -0700
committerLinus Torvalds <[email protected]>2020-04-07 10:43:43 -0700
commitc8df0ab61454aa1c84e97af3673ee8db44e39f05 (patch)
tree516ac57fda54f11df710b474670b11184990d8f4
parentdfa05c28ca7ffc0a94e7a35b91014d088c1a1ff5 (diff)
checkpatch: check SPDX tags in YAML files
This adds a warning when a YAML file is lacking a SPDX header on first line, or it uses incorrect commenting style. Currently the only YAML files in the tree are Devicetree binding documents. Signed-off-by: Lubomir Rintel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Joe Perches <[email protected]> Cc: Rob Herring <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3f62971c7c98..977d4c0c2dc9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3106,7 +3106,7 @@ sub process {
$comment = '/*';
} elsif ($realfile =~ /\.(c|dts|dtsi)$/) {
$comment = '//';
- } elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc)$/) {
+ } elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc|yaml)$/) {
$comment = '#';
} elsif ($realfile =~ /\.rst$/) {
$comment = '..';