From e99d0a855080dedfe19d72d4e8f6825c70d10f15 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Fri, 24 Jun 2022 19:25:48 +0100 Subject: [PATCH] Add new .clang-format with Microsoft base style --- .clang-format | 77 +++++++++++++++++---------------------------------- 1 file changed, 26 insertions(+), 51 deletions(-) diff --git a/.clang-format b/.clang-format index ceec955c3..1ee1d06ef 100644 --- a/.clang-format +++ b/.clang-format @@ -1,54 +1,29 @@ --- Language: Cpp -AccessModifierOffset: -2 -AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: true -AlignOperands: true -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterReturnType: AllDefinitions -AlwaysBreakTemplateDeclarations: true -BinPackArguments: true -BinPackParameters: true -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Custom -BraceWrapping: - AfterClass: true - AfterControlStatement: true - AfterFunction: true - AfterNamespace: false - AfterStruct: true - IndentBraces: true - BeforeElse: true - BeforeCatch: true -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false +BasedOnStyle: Microsoft + +AllowAllArgumentsOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AlwaysBreakAfterReturnType: TopLevelDefinitions +AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false ColumnLimit: 100 -ConstructorInitializerAllOnOneLineOrOnePerLine: true -Cpp11BracedListStyle: true -DerivePointerAlignment: false -IndentCaseLabels: false -IndentWidth: 2 -NamespaceIndentation: None -PointerAlignment: Right -ReflowComments: false -SortIncludes: false -SpaceAfterCStyleCast: true -SpaceAfterTemplateKeyword: true -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: Always -SpaceInEmptyParentheses: false -SpacesInAngles: false -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: 'Cpp11' -UseTab: Never -... +DeriveLineEnding: false +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^(<|")ns3/' + Priority: 2 + SortPriority: 0 + - Regex: "^<" + Priority: 3 + SortPriority: 0 + - Regex: ".*" + Priority: 1 + SortPriority: 0 +KeepEmptyLinesAtTheStartOfBlocks: false +PackConstructorInitializers: Never +PointerAlignment: Left +QualifierAlignment: Left +SeparateDefinitionBlocks: Always +Standard: "c++17"