diff --git a/.clang-format b/.clang-format index ea2a2257babe01c1814f5764875509ada2d8b465..bc951c7539c78c4fa00efde0030dcf12b126686a 100644 --- a/.clang-format +++ b/.clang-format @@ -1,7 +1,8 @@ --- Language: Cpp BasedOnStyle: Google -AccessModifierOffset: 0 +IndentAccessModifiers: false +AccessModifierOffset: -2 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: true @@ -11,7 +12,7 @@ AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: All +AllowShortFunctionsOnASingleLine: Empty AllowShortIfStatementsOnASingleLine: true AllowShortLoopsOnASingleLine: true AlwaysBreakAfterDefinitionReturnType: None @@ -20,24 +21,24 @@ AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: true BinPackArguments: true BinPackParameters: false +BreakBeforeBraces: Custom BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false + AfterClass: true + AfterControlStatement: Always + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true + AfterUnion: true AfterExternBlock: false - BeforeCatch: false - BeforeElse: false + BeforeCatch: true + BeforeElse: true IndentBraces: false SplitEmptyFunction: true SplitEmptyRecord: true SplitEmptyNamespace: true BreakBeforeBinaryOperators: None -BreakBeforeBraces: Linux BreakBeforeInheritanceComma: false BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false @@ -45,7 +46,8 @@ BreakConstructorInitializers: BeforeColon BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true ColumnLimit: 119 -CommentPragmas: "^ IWYU pragma:" +# CommentPragmas: "^ IWYU pragma: ^\\.+" +CommentPragmas: '^\\.+' CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 4 @@ -60,17 +62,17 @@ ForEachMacros: - Q_FOREACH - BOOST_FOREACH IncludeBlocks: Preserve -IncludeCategories: - - Regex: '^<pinocchio/fwd\.hpp>' - Priority: 1 - - Regex: '^<ext/.*\.h>' - Priority: 3 - - Regex: '^<.*\.h>' - Priority: 2 - - Regex: "^<.*" - Priority: 3 - - Regex: ".*" - Priority: 4 +# IncludeCategories: +# - Regex: '^<pinocchio/fwd\.hpp>' +# Priority: 1 +# - Regex: '^<ext/.*\.h>' +# Priority: 3 +# - Regex: '^<.*\.h>' +# Priority: 2 +# - Regex: "^<.*" +# Priority: 3 +# - Regex: ".*" +# Priority: 4 IncludeIsMainRegex: "([-_](test|unittest))?$" IndentCaseLabels: true IndentPPDirectives: None