-
Notifications
You must be signed in to change notification settings - Fork 817
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 and run formatter? #2959
Comments
One concern is the disruption to git-blame. Is the current policy and process and code base so bad that such a disruption is necessary? Can you give an example or two that are causing you or others problems? |
Running a formatter at the end to fix up issues is definitely easier then trying to match the format of the current file. As to current policy, I don't actually know what the current format policy is? Is it written down, or is it just match whatever the current file does? The reformat does cause you to have to step over it in git blame, but is that any different then if a file moved? |
There is a Also related: #1707 |
Ah missed that. I still think it would be useful to run over all of the source as a onetime event to get everything to the same format. Otherwise, you still run into the issue that you have to match current style. |
Ultimately, yes, I think we should toward this practice. Before you go to the trouble of submitting a PR, I would like to review the current .clang-format and the impact it would have. |
It would be nice if we switched to one of the standard formats so the clang-format is just a |
I will look at that. |
If we're going to do this, I think we should have a check in CI that enforces it. Otherwise, we'll just end up here again. |
I don't have any personal experience with this, but |
Would there be any objection to adding a clang-format file and running the formatter?
I'd recommend something as simple as possible like:
The text was updated successfully, but these errors were encountered: