-
Notifications
You must be signed in to change notification settings - Fork 5
AA2104FileMustOnlyContainOneTypeDefinition
Warning: this wiki page is auto-generated by the Arnolyzer solution-build process. Do not directly edit this page, as your changes will be lost on the next commit. To edit this page, please refer to Contributing to this project.
These wiki pages reflect the state of the project in development, per the last commit. For details of the latest release of the Arnolyzer Analysers, please see the Arnolyzer website.
Report code: AA2104-FileMustOnlyContainOneTypeDefinition
| Status | Implemented |
| Description | To comply with the single responsibility principle, a file should only contain one non-private type definition. |
| Category | Single Responsibilty Analyzers |
| Enabled by default: | Yes |
| Severity: | Error |
A file that contains more than one class, enum or interface definition inherently contains more than one responsibility.
In addition, the discoverability of these types is made harder as the pattern of matching type and file names breaks down, as there's no clear way of naming the file to match the contents.
There currently aren't any implemented code-fixes for this rule.
This rule cannot be suppressed.