Migrate avoid_late_keyword rule (default behavior) and tests#231
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the AvoidLateKeywordRule to the AnalysisRule framework, introducing a dedicated visitor and unit tests. The review highlights a regression where configuration parameters for ignoring types and allowing initializers were removed, and notes a missing import in the visitor class that will cause a compilation error.
|
@Islam-Shaaban-Ibrahim, I believe this rule needs custom params to allow users to configure it. |
0f69812 to
730d708
Compare
d51e1bf to
0975ba7
Compare
730d708 to
6092317
Compare
solid-danylosafonov
left a comment
There was a problem hiding this comment.
looks like it needs to be rebased?
| registry.registerLintRule( | ||
| final analysisLoader = AnalysisOptionsLoader(); | ||
|
|
||
| final doubleLiteralFormatRule = DoubleLiteralFormatRule(); |
There was a problem hiding this comment.
why is this one a variable while others are inline?
There was a problem hiding this comment.
My plan was to make them all inline and implement a common interface that exposes the fixes for each diagnostic code, so we can loop on all lints and register them then loop on all fixes per lint and register them
for (final rule in lintRules) {
registry.registerLintRule(rule);
for (final MapEntry(key: code, value: fixFn) in rule.fixesForCodes) {
registry.registerFixForRule(code, fixFn);
}
}Should be implemented in #285
fix: add old behavior test: migrate avoid late keyword rule tests
6092317 to
44cfc94
Compare
solid-danylosafonov
left a comment
There was a problem hiding this comment.
Two small changes suggested, otherwise lgtm
16e3e13
into
analysis_server_migration
No description provided.