-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
src: combine internal file read utils #31844
Conversation
1a534df
to
dd0ef45
Compare
7b89da3
to
6f017b7
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 but can you drop the braces around the single-statement if statements?
6f017b7
to
4d16408
Compare
@bnoordhuis i'd rather not do braceless if it isn't too much of a problem. |
It's at odds with the house style. Let me turn it around: what's the problem with braceless style? |
@bnoordhuis i don't think we really have a style one way or the other (if we wanted to, we should add a lint). The problem i have with braceless is that if braces eventually need to be added for multiple statements it shows an extra two lines of change in the diff. |
Majority rule. I did a quick scan - <insert not exact science warning> - and the braceless variant makes up 60% of the single-line
The |
is there some specific problem you have with braces? It seems they're prevalent in our source, and we don't have a lint against them, so I'm not sure why I wouldn't be able to use them. |
The prevailing style is to omit braces, ergo, new code should omit braces. Consistency trumps personal preference. |
8ae28ff
to
2935f72
Compare
Ping @devsnek .. needs to be rebased |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes