diff options
author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-16 15:22:55 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 13:03:57 -0400 |
commit | 84af7a6194e493fae312a2b7fa5a3b51f76d9282 (patch) | |
tree | bc79978850d383622c75f5beafc7425c4bef4cda | |
parent | 678ae162dd2fdda97879680426029dffc3e96041 (diff) |
checkpatch: kconfig: prefer 'help' over '---help---'
IMO, we should discourage '---help---' for new help texts, even in cases
where it would be consistent with other help texts in the file. This
will help if we ever want to get rid of '---help---' in the future.
Also simplify the code to only check for exactly '---help---'. Since
commit c2264564df3d ("kconfig: warn of unhandled characters in Kconfig
commands"), '---help---' is a proper keyword and can only appear in that
form. Prior to that commit, '---help---' working was more of a syntactic
quirk.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 54b782fab4fd..2784f6ab309f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -2817,7 +2817,11 @@ sub process { | |||
2817 | 2817 | ||
2818 | if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) { | 2818 | if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) { |
2819 | $is_start = 1; | 2819 | $is_start = 1; |
2820 | } elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) { | 2820 | } elsif ($lines[$ln - 1] =~ /^\+\s*(?:help|---help---)\s*$/) { |
2821 | if ($lines[$ln - 1] =~ "---help---") { | ||
2822 | WARN("CONFIG_DESCRIPTION", | ||
2823 | "prefer 'help' over '---help---' for new help texts\n" . $herecurr); | ||
2824 | } | ||
2821 | $length = -1; | 2825 | $length = -1; |
2822 | } | 2826 | } |
2823 | 2827 | ||