• Nicolas Palix's avatar
    Coccinelle: Add misc/ifcol.cocci · 49ab7a39
    Nicolas Palix authored
    Find confusingly indented code in or after an if.  An if branch should
    be indented.  The code following an if should not be indented.
    Sometimes, code after an if that is indented is actually intended to be
    part of the if branch.
    
    This has a high rate of false positives, because Coccinelle's column
    calculation does not distinguish between spaces and tabs, so code that
    is not visually aligned may be considered to be in the same column.
    Signed-off-by: default avatarNicolas Palix <npalix@diku.dk>
    Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
    Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
    49ab7a39
ifcol.cocci 1.21 KB