-
Notifications
You must be signed in to change notification settings - Fork 4
AA2103MethodShouldNotContainAnd
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: AA2103-MethodShouldNotContainAnd
Status | Implemented |
Description | Method names that contain "And" often indicate a method is doing more than one thing. Consider refacting into two methods. |
Category | Single Responsibilty Analyzers |
Enabled by default: | Yes |
Severity: | Warning |
Methods that contain "And" in their name often undertake two tasks and thus have two responsibilities. Thus they are likely to violate the single responsibility principle.
There currently aren't any implemented code-fixes for this rule.
This rule can be suppressed using the following attributes:
[HasSingleResponsibility]
A method annotated with HasSingleResponsibility is allowed to contain "And" as it is explicitly guaranteeing that it only has one responsibility.