-
Notifications
You must be signed in to change notification settings - Fork 309
Add .clang-format file #707
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
Add .clang-format file #707
Conversation
My preference is to disable bracewrapping. Any other opinions? |
My personal style preference is to match the EXR style of brace wrapping. Thats an aesthetic argument, though. The non-aesthetic argument might be that sticking closer to EXR's style will help make ASWF projects more consistent. If we're going to add a clang-format file, we may want to also add a unit test (similar to the python lint test) to make sure that new code is formatted with the style sheet. What do folks think about that? |
Yes, we should definitely have a test for correct formatting. I was also thinking of the open PRs that might be based on an older commit. Rebasing them might give large and ugly conflicts. So what might be a way of handling such a situation. There's this blog that shows how MongoDB handled the situation. But I haven't gone throught their algorithm to handle it properly yet. |
Open PRs will need to be rebased, but thats ok. Before we land this change, we can also make sure there aren't any large PRs left open. |
To fix the build, you need to add this file to the |
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.
For review at TSC. I propose we land this.
Codecov Report
@@ Coverage Diff @@
## master #707 +/- ##
=======================================
Coverage 85.55% 85.55%
=======================================
Files 192 192
Lines 18317 18317
Branches 2056 2056
=======================================
Hits 15672 15672
Misses 2119 2119
Partials 526 526
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
6d1ebf7
to
9e1546c
Compare
Closes #706
I've added a clang format file. This is the one from openEXR with a tiny change. The space before parentheses has been removed.
I'd also like to propose to disable brace wrapping after these declarations (these wrappinngs aren't present in the code currently so disabling them should be comfortable):
Any thoughts or additional changes you'd like to propose?
If everyone agrees then I'll reformat the files and update the PR.
@jminor @meshula @ssteinbach @reinecke