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

Require braces on control flow statements #683

Merged
merged 3 commits into from
Jul 28, 2021
Merged

Require braces on control flow statements #683

merged 3 commits into from
Jul 28, 2021

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Jul 27, 2021

This implements #623

@jonmeow jonmeow requested a review from geoffromer July 27, 2021 23:11
@jonmeow jonmeow requested a review from a team as a code owner July 27, 2021 23:12
@google-cla google-cla bot added the cla: yes PR meets CLA requirements according to bot. label Jul 27, 2021
Comment on lines 6 to 10
if (0 == 1) {
return 1;
} else {
return 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we keep the outer if statement? My hunch is the nesting is part of the point of this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and renamed tests to make the intent clearer. FWIW my assumption had been it was for else binding (which is now a non-issue)

@jonmeow jonmeow merged commit 4946ae8 into carbon-language:trunk Jul 28, 2021
@jonmeow jonmeow deleted the require-braces branch July 28, 2021 17:55
chandlerc pushed a commit that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes PR meets CLA requirements according to bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants