-
Notifications
You must be signed in to change notification settings - Fork 270
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
Use clang-format on Travis #866
Comments
I think we should do it step by step:
|
|
|
How reliable is this author's executable file? Also, what about newer versions. I don't think clang-format officially develops a windows executable. |
Closed via #898 |
I've heard from several different people that they simply enforce using clang-format in continuous integration. That way, there are no more discussions about what the right formatting should be --- the right formatting is the one specified in the
.clang-format
file, which tells clang-format how to format the source code. And the formatting is automatic.Here is the documentation: http://clang.llvm.org/docs/ClangFormat.html, it integrates with Vim and Emacs, etc.
The pros are:
.clang-format
file)The cons are:
We'll probably need to have a script that takes a PR, and reformats each patch. Then we can easily fix other people's PRs if they don't have access to clang-format. I.e. the author will fix the PR with regards to functionality, creates a nice set of patches, and then we just need to run our script from a command line that runs each commit through clang-format, resubmit as a new PR, and then merge.
So I think overall this might work.
This would fix #138, #764, #830, #831, #838.
Here is an example how another project implemented it and their documentation about it:
https://github.com/nest/nest-simulator/blob/2341e1d7209b28d9636fbed576ac3824a3e36087/build.sh#L136
https://nest.github.io/nest-simulator/coding_guidelines_c++
The text was updated successfully, but these errors were encountered: