From 8c85386640bef270972cef2524ce29ae654a234b Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Fri, 9 Aug 2019 13:24:52 +0300 Subject: [PATCH] Run whatstyle to derive clang-format settings find . -name "*.c" | xargs whatstyle --formatter clang-format --- .clang-format | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..8f020d0 --- /dev/null +++ b/.clang-format @@ -0,0 +1,20 @@ +--- +BasedOnStyle: WebKit +AlignAfterOpenBracket: Align +AlignEscapedNewlines: DontAlign +AlignOperands: true +AlignTrailingComments: true +AllowShortBlocksOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +BraceWrapping: + AfterFunction: true + BeforeElse: true +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +ContinuationIndentWidth: 0 +DerivePointerAlignment: true +MaxEmptyLinesToKeep: 2 +SortIncludes: false +SpacesBeforeTrailingComments: 2