Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulkFixProcessorTest should have FixKind #60190

Open
FMorschel opened this issue Feb 21, 2025 · 0 comments
Open

BulkFixProcessorTest should have FixKind #60190

FMorschel opened this issue Feb 21, 2025 · 0 comments

Comments

@FMorschel
Copy link
Contributor

While working for #60184 at https://dart-review.googlesource.com/c/sdk/+/411101, I had to remove a behaviour from ReplaceWithVar (pkg\analysis_server\lib\src\services\correction\dart\replace_with_var.dart) that was for it to stop solving for const and final declarations and add RemoveTypeAnnotation (pkg\analysis_server\lib\src\services\correction\dart\remove_type_annotation.dart) to the list of possible fixes wherever it was so it could solve for those cases.

The problem was that while copying and pasting some of the tests for the Replace with var lint over to Remove Type Annotation, I accidentally pasted some code over OmitObviousLocalVariableTypesLintBulkTest.test_singleFile (pkg\analysis_server\test\src\services\correction\fix\replace_with_var_test.dart) adding const and final to de declarations of variables in that test.

And fortunatelly I found that when reviewing the changes but that test was passing because now the other fix was resolving that case. So I'm opening this issue to track this.

I'm not sure if there will be any case where this FixKind being added could make the tests stop passing (unless we found more cases like this) but I don't think there will be.

WDYT @bwilkerson @scheglov? Not sure how big this change would be too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant