]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Add a clang-format configuration file
authorAlex Richardson <arichardson.kde@gmail.com>
Tue, 17 May 2022 09:26:58 +0000 (09:26 +0000)
committerSimon McVittie <smcv@collabora.com>
Wed, 18 May 2022 11:48:04 +0000 (11:48 +0000)
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.

.clang-format [new file with mode: 0644]

diff --git a/.clang-format b/.clang-format
new file mode 100644 (file)
index 0000000..6c1859a
--- /dev/null
@@ -0,0 +1,5 @@
+BasedOnStyle: GNU
+AlwaysBreakAfterDefinitionReturnType: All
+BreakBeforeBinaryOperators: None
+BinPackParameters: false
+SpaceAfterCStyleCast: true