Skip to content

Commit 628f91a

Browse files
JoePerchestorvalds
authored andcommitted
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.com Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent fb0d0e0 commit 628f91a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/checkpatch.pl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,6 +2776,17 @@ sub process {
27762776
#print "is_start<$is_start> is_end<$is_end> length<$length>\n";
27772777
}
27782778

2779+
# check for MAINTAINERS entries that don't have the right form
2780+
if ($realfile =~ /^MAINTAINERS$/ &&
2781+
$rawline =~ /^\+[A-Z]:/ &&
2782+
$rawline !~ /^\+[A-Z]:\t\S/) {
2783+
if (WARN("MAINTAINERS_STYLE",
2784+
"MAINTAINERS entries use one tab after TYPE:\n" . $herecurr) &&
2785+
$fix) {
2786+
$fixed[$fixlinenr] =~ s/^(\+[A-Z]):\s*/$1:\t/;
2787+
}
2788+
}
2789+
27792790
# discourage the use of boolean for type definition attributes of Kconfig options
27802791
if ($realfile =~ /Kconfig/ &&
27812792
$line =~ /^\+\s*\bboolean\b/) {

0 commit comments

Comments
 (0)