Commit 628f91a2 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: warn when a MAINTAINERS entry isn't [A-Z]:\t

For consistency, MAINTAINERS entries should be an upper case letter,
then a colon, then a tab, then the value.

Warn when an entry doesn't have this form.  --fix it too.

Link: http://lkml.kernel.org/r/9aaaf03ec10adf3888b5e98dd2176b7fe9b5fad8.1496343345.git.joe@perches.comSigned-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fb0d0e08
...@@ -2776,6 +2776,17 @@ sub process { ...@@ -2776,6 +2776,17 @@ sub process {
#print "is_start<$is_start> is_end<$is_end> length<$length>\n"; #print "is_start<$is_start> is_end<$is_end> length<$length>\n";
} }
# check for MAINTAINERS entries that don't have the right form
if ($realfile =~ /^MAINTAINERS$/ &&
$rawline =~ /^\+[A-Z]:/ &&
$rawline !~ /^\+[A-Z]:\t\S/) {
if (WARN("MAINTAINERS_STYLE",
"MAINTAINERS entries use one tab after TYPE:\n" . $herecurr) &&
$fix) {
$fixed[$fixlinenr] =~ s/^(\+[A-Z]):\s*/$1:\t/;
}
}
# discourage the use of boolean for type definition attributes of Kconfig options # discourage the use of boolean for type definition attributes of Kconfig options
if ($realfile =~ /Kconfig/ && if ($realfile =~ /Kconfig/ &&
$line =~ /^\+\s*\bboolean\b/) { $line =~ /^\+\s*\bboolean\b/) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment