lkml.org 
[lkml]   [2018]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] checkpatch: kconfig: prefer 'help' over '---help---'
    Date
    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>
    ---
    scripts/checkpatch.pl | 6 +++++-
    1 file changed, 5 insertions(+), 1 deletion(-)

    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 {

    if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) {
    $is_start = 1;
    - } elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) {
    + } elsif ($lines[$ln - 1] =~ /^\+\s*(?:help|---help---)\s*$/) {
    + if ($lines[$ln - 1] =~ "---help---") {
    + WARN("CONFIG_DESCRIPTION",
    + "prefer 'help' over '---help---' for new help texts\n" . $herecurr);
    + }
    $length = -1;
    }

    --
    2.14.1
    \
     
     \ /
      Last update: 2018-02-16 21:24    [W:5.039 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site