Browse Source

Modifiy formatting rules

* Allow a single line for empty functions only.
* Don't allow if statements on a single line.

This improves readability and helps when debugging.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Stefan Weil 2 years ago
parent
commit
e262d71a56
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      .clang-format

+ 4
- 0
.clang-format

@@ -1,5 +1,9 @@
 ---
 BasedOnStyle:  Google
+# Only merge empty functions.
+AllowShortFunctionsOnASingleLine: Empty
+# Do not allow short if statements.
+AllowShortIfStatementsOnASingleLine: false
 # Enforce always the same pointer alignment.
 DerivePointerAlignment: false
 IndentPPDirectives: AfterHash