Migrated prefer_early_return and its tests#233
Migrated prefer_early_return and its tests#233Dariaa14 wants to merge 2 commits intoanalysis_server_migrationfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the PreferEarlyReturnRule from SolidLintRule to AnalysisRule and updates the PreferEarlyReturnVisitor to report diagnostics directly via the rule instance. It also introduces a comprehensive test suite to verify the lint's behavior in various scenarios. A minor grammatical correction was suggested for the lint message to ensure consistency with the rule's description.
| /// Lint code | ||
| static const LintCode _code = LintCode( | ||
| lintName, | ||
| "Use reverse if reduce nesting", |
There was a problem hiding this comment.
There was a problem hiding this comment.
@Dariaa14, please take a look. Also, I believe we can extract it into a constant to reuse.
solid-vovabeloded
left a comment
There was a problem hiding this comment.
Well done, @Dariaa14!
I added one minor suggestion here, but approving it right away since it is minor.
| /// Lint code | ||
| static const LintCode _code = LintCode( | ||
| lintName, | ||
| "Use reverse if reduce nesting", |
There was a problem hiding this comment.
@Dariaa14, please take a look. Also, I believe we can extract it into a constant to reuse.
No description provided.