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

Remove --fix #1153

Closed
munificent opened this issue Dec 13, 2022 · 0 comments · Fixed by #1195
Closed

Remove --fix #1153

munificent opened this issue Dec 13, 2022 · 0 comments · Fixed by #1195
Labels
--fix Adding or changing a fix enhancement

Comments

@munificent
Copy link
Member

The --fix support in dart_style is older than the dart fix command. That command can now apply all of the fixes that dart format --fix can and many many more. It's redundant and confusing to have two ways to apply automated code clean-ups. And the implementations of the fixes in dart_style is kind of hacky and brittle. I believe there are cases where the resulting fixed code doesn't end up with the same formatting you'd get if you applied the fix separately.

Dart 3 gives us a chance to clean up our CLI user experience, so it's a great time to remove --fix from dart format and delete all of that crufty code. We can leave the options in there as hidden. If you pass any, instead of applying the fix, it will print a diagnostic telling you how to run dart fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--fix Adding or changing a fix enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant