sdk
sdk copied to clipboard
dart fix with specific codes always applies pubspec related fixes
This issues relates to the dart fix CLI command.
Dart fix supports supplying specific issue codes, to restrict the issues that the tool fixes and applies.
This works for dart related issues, but the tool seems to always apply pubspec related fixes, even when those codes are not specified.
Here is a sample demonstrating the problem: https://github.com/josh-burton/dart_fix_bug
To reproduce, run dart fix --apply --code=unused_import
Expected result: only the unused_import fix should be applied.
Actual result: both the unused_import fix and the missing_dependency fix are applied.
- Dart 3.8.1
- MacOS
Tagging @FMorschel from out Twitter conversation.
WDYT @bwilkerson? Maybe this was intentional, but I'm not sure.
I don't think that was intentional, but more importantly I think that's not the way the tool should work. I think it's confusing for users for the semantics to be different between .dart and .yaml files.