Skip to content
On this page

NestingLevel

Checks the nesting level for methods.

Scope

Generic.Metrics.NestingLevel

Description

Functions should not have a nesting level greater than 10, and should try to stay below 5.

Properties

Property NameTypeDefaultAvailable Since
absoluteNestingLevelint10-
nestingLevelint5-

Usage

xml
<rule ref="Generic.Metrics.NestingLevel">
    <properties>
        <property name="nestingLevel" value="8" />
        <property name="absoluteNestingLevel" value="12" />
    </properties>
</rule>

Examples

No Examples Available

Please edit this page through Github to add examples.

Released under the MIT License.