Add new .clang-format with Microsoft base style

This commit is contained in:
Eduardo Almeida
2022-06-24 19:25:48 +01:00
parent 39cc8431e1
commit e99d0a8550

View File

@@ -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"