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

Fix bug where nested MissingBraces violations' suggested fixes result in broken code #4102

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link
Contributor

Fix bug where nested MissingBraces violations' suggested fixes result in broken code

@holtherndon-stripe came across this issue while applying MissingBraces to Stripe's code base of 4 million lines of Java code.

See unit test for sample code.

I'm not sure about a few things:

  • Why does the coalescing code suppress duplicate inserts? It seems a bit odd that this is the default. I wonder which checkers' fixes need this, and why.
  • Is Fix the right level of abstraction? Or should the coalescing policy be per Replacement?

Fixes #3797

FUTURE_COPYBARA_INTEGRATE_REVIEW=#3797 from keithl-stripe:keithl-missing-braces-patch de82c53

@copybara-service copybara-service bot closed this Sep 19, 2023
@copybara-service copybara-service bot deleted the test_564840815 branch September 19, 2023 17:38
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.

0 participants