Skip to content

Commit

Permalink
Add Google-style .clang-format file.
Browse files Browse the repository at this point in the history
It would be nice if the repository contained a clang-format
config file so that PR submitters could use tooling to correctly
format their code match Googles/abseils style.

This also makes it easier for reviewers to specify what coding style
should be used. ie the one the tooling produces.

The clang-format file is the default Google configuration as dumped by `clang-format`.
I'm not sure abseil will want the exact same options, but it seemed like the right
starting place.
  • Loading branch information
EricWF committed Oct 12, 2017
1 parent 40b90bc commit 894a869
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
Language: Cpp
BasedOnStyle: Google
...
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ will be expected to conform to the style outlined
made and **why** it was made. Link to a GitHub issue if it exists.

* Don't fix code style and formatting unless you are already changing that
line to address an issue. PRs with irrelevant changes won't be merged. If
line to address an issue. Formatting of modified lines may be done using
`git clang-format`. PRs with irrelevant changes won't be merged. If
you do want to fix formatting or style, do that in a separate PR.

* Unless your PR is trivial, you should expect there will be reviewer comments
Expand Down

0 comments on commit 894a869

Please sign in to comment.