From 603c639030c3d0582dcd499fa3ee95f2a26885d2 Mon Sep 17 00:00:00 2001 From: Tobias Markmann <tm@ayena.de> Date: Mon, 14 Mar 2016 22:47:25 +0100 Subject: Add .clang-format configuration file for Swift projects Test-Information: Applied it on 50 random source and header files. The result looked pretty much like the style we currently use. Change-Id: I23806261a22330acfcbb8f197f76d35227e32d6d diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..8c8601e --- /dev/null +++ b/.clang-format @@ -0,0 +1,39 @@ +--- +Language: Cpp +UseTab: Never +TabWidth: 2 +Standard: Cpp11 +ConstructorInitializerIndentWidth: 2 +ContinuationIndentWidth: 2 +IndentWidth: 2 +PointerAlignment: Left +ReflowComments: false +# clang-format does not correctly detect corresponding header files at the moment. +# Use BuildTools/FixIncludes.py for now. Enable this when it does. +SortIncludes: false +AccessModifierOffset: -2 +NamespaceIndentation: All +# A ultra high column limit is required as a column limit of 0 does not work as documented. +ColumnLimit: 900 +AllowShortBlocksOnASingleLine: false +AllowShortFunctionsOnASingleLine: Empty +AllowShortLoopsOnASingleLine: false +IndentCaseLabels: true +BreakBeforeBraces: Custom +BraceWrapping: + AfterClass: false + AfterControlStatement: false + AfterEnum: false + AfterFunction: false + AfterNamespace: false + AfterObjCDeclaration: false + AfterStruct: false + AfterUnion: false + BeforeCatch: true + BeforeElse: true + IndentBraces: false +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +BreakConstructorInitializersBeforeComma: false +AlignAfterOpenBracket: Align +ConstructorInitializerAllOnOneLineOrOnePerLine: true +AlwaysBreakTemplateDeclarations: true \ No newline at end of file -- cgit v0.10.2-6-g49f6