checkIfElse

Checks if every if has a matching else section. Defining an else section for every if improves readability by showing more clearly what it means when the if (and possible elseif's) condition are not satisfied.

Exemption tag: %@ok<IFELS>

Configurable parameters

  • AllowIfWithoutElse (boolean): Set to true to allow an if, that does not have an elseif section, without a matching else section. The default value for this parameter is false.