chore(style): add .clang-format

This commit is contained in:
fallenoak 2023-01-05 22:51:18 -06:00
parent cb62e2dcfe
commit 84d44014f5
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 57 additions and 0 deletions

55
.clang-format Normal file
View File

@ -0,0 +1,55 @@
---
AccessModifierOffset: 0
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: false
DerivePointerAlignment: false
IncludeBlocks: Merge
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: "<[[:alnum:].]+>"
Priority: 4
- Regex: ".*"
Priority: 1
SortPriority: 0
IndentGotoLabels: false
IndentWidth: 4
MaxEmptyLinesToKeep: 1
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PointerAlignment: Left
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
Standard: c++11
TabWidth: 4
TypenameMacros: ['STORM_EXPLICIT_LIST', 'STORM_LIST']
UseCRLF: false
UseTab: Never

2
.clang-format-ignore Normal file
View File

@ -0,0 +1,2 @@
/lib
/vendor