-
Notifications
You must be signed in to change notification settings - Fork 134
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
Simplify error-prone refactoring code #2843
Conversation
Generate changelog in
|
// Work around https://github.com/google/error-prone/issues/3908 by explicitly enabling any | ||
// check we want to use patch checks for (ensuring it is not disabled); if this is fixed, the | ||
// -Xep:*:ERROR arguments could be removed | ||
return Iterables.concat( | ||
errorProneChecks.stream() | ||
.map(checkName -> "-Xep:" + checkName + ":ERROR") | ||
.collect(Collectors.toList()), |
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.
I was expecting this change to fail this test, but it is actually working 🤔
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.
I think the tests in BaselineErrorProneIntegrationTest
are very broken, they still pass if you stop disabling the checks.
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.
I recall some configuration ordering issues where checks may be configured before the gradle-baseline defaults are applied and override error-prone settings
Before this PR
Now we've upgraded to recent errorprone, there are some workarounds we had for bugs that are no longer necessary. Now that google/error-prone#3908 is fixed (and released in 2.26.0) we can avoid explicitly disabling checks when patching.
After this PR
==COMMIT_MSG==
Simplify error-prone refactoring code
==COMMIT_MSG==
Possible downsides?