From: Lubomir Rintel Date: Tue, 7 Apr 2020 03:10:51 +0000 (-0700) Subject: checkpatch: check SPDX tags in YAML files X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c8df0ab61454aa1c84e97af3673ee8db44e39f05;p=linux.git 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 Signed-off-by: Andrew Morton Acked-by: Joe Perches Cc: Rob Herring Link: http://lkml.kernel.org/r/20200129123356.388669-1-lkundrak@v3.sk Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3f62971c7c989..977d4c0c2dc99 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 = '..';