From 5be01b43fb4a4834ba8786518e50c6599c672c4b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 2 Jun 2022 16:56:24 +0200 Subject: [PATCH] Add clang-format rules Since we now have an external scanner, might as well have good looking code. --- .clang-format | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..afdb247 --- /dev/null +++ b/.clang-format @@ -0,0 +1,21 @@ +--- +BasedOnStyle: LLVM +IndentWidth: 4 +--- +Language: Cpp +# Force pointers to the type for C. +DerivePointerAlignment: false +PointerAlignment: Right + +# Short functions should not be on a single line, unless empty +AllowShortFunctionsOnASingleLine: Empty + +# It makes more sense this way +BreakBeforeBinaryOperators: All +BreakBeforeTernaryOperators: true + +# Aesthetic +AlignOperands: AlignAfterOperator +BinPackParameters: false +--- +# vim: ft=yaml