ifindent2

ifindent2: IF statement with questionable indenting or couldn't check

This page is only a quick overview of this rule, for more details see "ifindent-details".


When you run rule "infindent2", you are actually running rule "infindent" but only for the informational warning messages.

warning messages given

  • 201: informational. The next statement after the IF isn't in the same file as the IF,
    so we can't meaningfully compare indents.

  • 202: informational. The next statement node after the IF has less indent than the IF.
  • 203: informational. A subnode of the IF is in a different file, so no meaningful
    indent comparison can be made on this node. Only one of these warnings are
    output per IF statement, as an indicator.

How to suppress these warnings:

You can put the directive {&_proparse_ prolint-nowarn(ifindent2)} directly before
the IF statement. See also: suppress warnings.

implementation:
This rule is implemented in Turbolint.