[previous] 2215 [next] This indentation is not consistent with configured depth.
Bracing and Indentation

The depth of indentation appears to be inconsistent with the depth specified by the -indentlevel option.

By default, QA·C does not enforce any specific depth of indentation; but identifies inconsistent indentation with message 2201. Message 2215 is only generated when a specific depth of indentation is specified with the -indentlevel option and the code does not comply.

Be aware that message 2215 can sometimes be triggered by the use of tab characters and an inappropriate configuration of the tab spacing option -tab.

For example:


/*PRQA S 2017,3227,3408,3447 ++*/
/******************************
 * OPTIONS: -il 2
 ******************************/

extern int foo(int n)
{
    int r = 0;                          /* Message 2215 */

    if (n > 0)
    {
      ++r;                              /* Message 2201 */
    }

    return r;
}

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents