lkml.org 
[lkml]   [2009]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] scripts/checkpatch.pl: Add warning about leading contination tests
    From
    Date
    Signed-off-by: Joe Perches <joe@perches.com>

    diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
    index bc4114f..c35933a 100755
    --- a/scripts/checkpatch.pl
    +++ b/scripts/checkpatch.pl
    @@ -2064,6 +2064,11 @@ sub process {
    CHK("multiple assignments should be avoided\n" . $herecurr);
    }

    +# Check use of leading logical continuation tests
    + if ($line =~ /^.\s*(\|\||&&)/) {
    + WARN("Continuation logic should be at end of previous line\n" . $herecurr);
    + }
    +
    ## # check for multiple declarations, allowing for a function declaration
    ## # continuation.
    ## if ($line =~ /^.\s*$Type\s+$Ident(?:\s*=[^,{]*)?\s*,\s*$Ident.*/ &&



    \
     
     \ /
      Last update: 2009-12-05 19:01    [W:0.045 / U:0.284 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site