aboutsummaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorMarco Poletti <poletti.marco@gmail.com>2017-12-27 09:23:44 +0000
committerMarco Poletti <poletti.marco@gmail.com>2017-12-27 09:23:44 +0000
commit1b959abb02fa151f472d9d3cbaefc96a292985fe (patch)
treede2eaef1e9d57d4ab172069accfc0215dd2b7073 /CONTRIBUTING.md
parentdad7ba8e69a1041e8b8315d189ed278b45f6f621 (diff)
downloadgoogle-fruit-1b959abb02fa151f472d9d3cbaefc96a292985fe.tar.gz
Add a .clang-format config file and reformat all C++ source code using that. Also added some documentation on the preferred style in CONTRIBUTING.md.
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f1dc344..336737e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -220,3 +220,12 @@ branches (respectively) that can't be covered and therefore should be excluded.
Note that the "percentage of **functions** covered" metric is not meaningful for Fruit, since it considers each
instantiation of a template function/method as separate (even if they share the same source lines).
+
+## Code style
+
+C++ code in Fruit should be indented using clang-format (a `.clang-format` file is provided in the Fruit root
+directory). You can re-indent all code using this command:
+
+```bash
+$ clang-format -i $(git ls-files | egrep '\.cpp|\.h' )
+```