summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorAlex Richardson <arichardson.kde@gmail.com>2022-05-17 09:26:58 +0000
committerSimon McVittie <smcv@collabora.com>2022-05-18 11:48:04 +0000
commita68209cb23cd68e8803b1d09667fb8d3b8e8b29a (patch)
tree367bbd58b5ab73c38e1eaae8c26d2999a0ce1484 /.clang-format
parentcbad0a74f76a6868e6ea65fa1b90bd9b42cdc8a5 (diff)
downloaddbus-a68209cb23cd68e8803b1d09667fb8d3b8e8b29a.tar.gz
Add a clang-format configuration file
This ensures that IDEs such as CLion automatically use the correct indentation, and running `git-clang-format` results in patches that are actually quite close to the current style. It doesn't handle alignment of parameters in function declarations, but otherwise it seems accurate.
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format5
1 files changed, 5 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..6c1859a6
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,5 @@
+BasedOnStyle: GNU
+AlwaysBreakAfterDefinitionReturnType: All
+BreakBeforeBinaryOperators: None
+BinPackParameters: false
+SpaceAfterCStyleCast: true