From 710dfb47f80609742071896924233db8a82a8fb7 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 1 Oct 2018 15:04:57 +0200 Subject: [PATCH] add .clang-format So that it is possible to automatically format code. Signed-off-by: Igor Gnatenko --- .clang-format | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..ed11d3fbb --- /dev/null +++ b/.clang-format @@ -0,0 +1,33 @@ +--- +BasedOnStyle: WebKit +--- +Language: Cpp + +AlwaysBreakAfterReturnType: AllDefinitions +# GNU, except for enum/struct/union/extern braces +BreakBeforeBraces: Custom +BraceWrapping: + AfterControlStatement: true + AfterEnum: false + AfterFunction: true + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeElse: true + IndentBraces: true +ForEachMacros: + - FOR_REPO_SOLVABLES + - FOR_REPODATAS + - FOR_PROVIDES + - FOR_REPOS + - FOR_POOL_SOLVABLES + - FOR_RULELITERALS + - FOR_JOB_SELECT + # This is a bit of obuse to get indentation + - IF_POOLDEBUG +IndentWidth: 2 +PointerAlignment: Right +SortIncludes: false +TabWidth: 8 +UseTab: Always +...