Add lib/fix_data.yaml
for automatic migration with dart fix
.
#198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These fixes will also show up as "quick fixes" in IDEs. Users do not need to run
dart fix --apply
manually.Example:
Will be updated by
dart fix --apply
to:Ultimate problem:
@Deprecated
message onvalidateWithResults
was not automatically migrated.How it was fixed:
Added
lib/fix_data.yaml
with data driven fixes.Testing suggestions:
It's possible to make a
test_fixes/
folder with golden files that can be tested withdart fix --compare-to-golden
however this is probably overkill. See testing.I manually tested this. There is probably no harm in leaving this in place even after 5.0 is released, as it'll probably still facilitate quick fixes for anyone upgrading.
Potential areas of regression:
If these data driven fixes stop working, they aren't likely to cause much harm (they simply won't cause fixes to be suggested).
I mostly made this because I think
fix_data.yaml
is too cool, not to be used 🤣