-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Add staticanalysis.UnnecessaryParentheses
#7916
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
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
8fd8cf4
to
f3fb364
Compare
rewrite
support for errorprone.refasterrules
rewrite
support
rewrite
supportrewrite
support for staticanalysis.RemoveUnused
and OrderPomElements
rewrite
support for staticanalysis.RemoveUnused
and OrderPomElements
rewrite
support for staticanalysis.RemoveUnused
and maven.BestPractices
BUILD SUCCESS |
Thanks. I'm probably not going to try to figure out what it takes to integrate things fully, but I will try to eventually have a look at the |
Thanks for the response.
You mean the actual runtime? To make this opt in and still last, we could simply disable by default the execution via switch Just discovered you are (of course) a committer to Despite the large time consumption, its generally nice to fixes instead of dealing with them bugs manually, right? |
Hi, might consider these changes suggested by Thanks. |
There are a lot of changes in this and your other PR, and I would like to manage to spend a bunch of time to think them all through and offer a good response. Unfortunately, I have other responsibilities that I'm falling down on, so I'm trying to focus my Guava time more on changes that are user-facing. So I'll speak a little more generally. Guava has been, in our experience, a worst-case scenario for static analysis:
So, even as someone who loves static analysis, I am ambivalent about it for Guava. We do occasionally get nice improvements out of it, but when I fix static-analysis warnings, it's usually "so that those warnings will stop getting in our way," not "so that the code gets better." For Error Prone,that's been a long, ongoing process, one that I'm still not sure justifies the time spent (even, again, when much of the process is automated). Given that, I expect for additional static analysis for Guava to often feel more like a source of interruptions than like a source of improvements that end up justifying the costs. That says less about the static analysis than it does about Guava. (Certainly OpenRewrite has a better reputation than a variety of other static analyzers that I've seen run on Guava over the years, and the results so far have looked better.) I am likely to still pull some changes out of the PRs (like those for imports, |
rewrite
support for staticanalysis.RemoveUnused
and maven.BestPractices
staticanalysis.UnnecessaryParentheses
scope adjusted to UnnecessaryParentheses |
It stopped being set in cl/711476575, and it was somewhat incorrect even before that. Closes #7916 RELNOTES=n/a PiperOrigin-RevId: 793645777
I am confusing myself a bit with the PRs here, sorry. I think I did end up merging the |
PoC for:
rewrite
support forerrorprone.refasterrules
#7917