Skip to content

Commit

Permalink
clang format file
Browse files Browse the repository at this point in the history
  • Loading branch information
AngheloAlf committed Jun 1, 2024
1 parent 56cfbb2 commit 9c95b2e
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
IndentWidth: 4
Language: Cpp
UseTab: Never
ColumnLimit: 140
PointerAlignment: Left
SpaceAfterCStyleCast: false
Cpp11BracedListStyle: false
SpaceBeforeCpp11BracedList: false

# Cases inside switches are indented one level
IndentCaseLabels: true

AlignAfterOpenBracket: AlwaysBreak

AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: false
AllowShortLoopsOnASingleLine: false

# Otherwise it would align escaped newlines to the column limit
AlignEscapedNewlines: Left

AlignTrailingComments: true
SortIncludes: true

BreakBeforeBraces: Custom
BraceWrapping:
AfterControlStatement: Never
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeElse: true

# Adds a comment at the end of the namespace with its name
FixNamespaceComments: true
# Indent namespace's content
NamespaceIndentation: All

# Aligns preprocessor directives
IndentPPDirectives: AfterHash

# No space between template and <
SpaceAfterTemplateKeyword: false
# Newline after template
AlwaysBreakTemplateDeclarations: Yes

LambdaBodyIndentation: Signature

TypenameMacros: ["PTR"]

0 comments on commit 9c95b2e

Please sign in to comment.