Skip to content

Files

Latest commit

 

History

History
32 lines (18 loc) · 667 Bytes

OuterTypeNumber.md

File metadata and controls

32 lines (18 loc) · 667 Bytes

Pattern: Too many defined types at the outer level

Issue: -

Description

Checks for the number of types declared at the outer (or root) level in a file.

Rationale: It is considered good practice to only define one outer type per file.

Examples

To configure the check to accept 1 outer type per file:

<module name="OuterTypeNumber"/>

To configure the check to accept 2 outer types per file:

<module name="OuterTypeNumber">
      <property name="max" value="2"/>
</module>

Further Reading