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

improve testing of the 'dart fix' data #166

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Conversation

devoncarew
Copy link
Member

  • improve testing of the 'dart fix' data
  • remove fix data references to previous package:web types we no longer generate

When we reduced the number of generated APIs we stopped generating some classes referenced in the lib/fix_data.yaml file. Our testing didn't catch this, since the running dart fix --compare-to-golden just mechanically confirms that it can transform the file, not whether the resulting file is error free.

This PR creates a new temporary project with the test_fixes/renames.dart file - which contains the older dart:html type names - runs dart fix on that project, to update the references to the new package:web names, and runs dart analyze to make sure the result has no analysis issues.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@@ -14,6 +14,8 @@ analyzer:
# necessary
camel_case_types: ignore
non_constant_identifier_names: ignore
# Consider removing from dart_flutter_team_lints.
unreachable_from_main: ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this lint. How'd you hit it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the test_fixes/renames.dart file (which to be honest isn't really intended to be best practice dart code). From memory, I've also hit it a few other times where it was false positives.

@devoncarew devoncarew merged commit 1b197cb into main Feb 12, 2024
11 checks passed
@devoncarew devoncarew deleted the more_dart_fix_tests branch February 12, 2024 19:32
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

Successfully merging this pull request may close these issues.

2 participants