-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[espresso] Enable warnings as errors #3414
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
[espresso] Enable warnings as errors #3414
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
@stuartmorgan I managed to fix all violations, except one error (which is reported twice):
Do you have a clue on how to fix this one? Per https://mvnrepository.com/artifact/androidx.test.espresso/espresso-idling-resource we have the latest version of that dependency. |
.../src/main/java/androidx/test/espresso/flutter/exception/AmbiguousWidgetMatcherException.java
Outdated
Show resolved
Hide resolved
From what I found, we can't; see https://github.com/flutter/packages/blob/main/packages/google_maps_flutter/google_maps_flutter_android/example/android/build.gradle#L38-L40 |
test-exempt: Lints were updated, and they're verified in presubmit tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open questions about annotation scope but overall this looks good.
.../espresso/android/src/main/java/androidx/test/espresso/flutter/action/FlutterViewAction.java
Outdated
Show resolved
Hide resolved
...presso/android/src/main/java/androidx/test/espresso/flutter/action/SyntheticClickAction.java
Outdated
Show resolved
Hide resolved
...presso/android/src/main/java/androidx/test/espresso/flutter/action/SyntheticClickAction.java
Outdated
Show resolved
Hide resolved
packages/espresso/CHANGELOG.md
Outdated
|
||
* Aligns Dart and Flutter SDK constraints. | ||
* Changes the severity of `javac` warnings so that they are treated as errors and fixes the violations. | ||
* Migrates uses of the deprecated `@Beta` annotation to the new `@ExperimentalApi` annotation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be first, and have the **BREAKING CHANGE**
annotation described at https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
packages/espresso/CHANGELOG.md
Outdated
## 0.3.0 | ||
|
||
**BREAKING CHANGES**: | ||
* Changes the severity of `javac` warnings so that they are treated as errors and fixes the violations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one isn't a breaking change. It should be:
* **BREAKING CHANGE**: Migrates uses of the deprecated [...]
* Changes the severity [...]
* Aligns [...]
83f8a6c
to
ca4f092
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
[espresso] Enable warnings as errors
This PR enables
javac
lint options forespresso
and fixes the violations.List which issues are fixed by this PR. You must list at least one issue.
Part of flutter/flutter#91868
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
N/A
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.