Pattern: Too many defined types at the outer
level
Issue: -
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.
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>