Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
BasedOnStyle: LLVM # Options: LLVM, Google, Chromium, Mozilla, WebKit
IndentWidth: 4 # Number of spaces per indentation level
TabWidth: 4
UseTab: ForIndentation # Options: Never, ForIndentation, Always

ColumnLimit: 150 # Max characters per line (0 = no limit)

AlignConsecutiveAssignments: true
AlignTrailingComments: true

KeepEmptyLines:
AtEndOfFile: true
AtStartOfBlock: false
AtStartOfFile: false

BreakBeforeBraces: Allman # Options: Attach, Linux, Stroustrup, Allman, GNU, WebKit

AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false

PointerAlignment: Left # Options: Left, Right, Middle

SpacesInParentheses: false
SpaceBeforeParens: ControlStatements # e.g. `if (` but not `myFunction (`

Cpp11BracedListStyle: true
IndentCaseLabels: true

# Sort include blocks and categorize them
IncludeBlocks: Regroup
SortIncludes: true

# Namespace indentation
NamespaceIndentation: All # Options: None, Inner, All
Loading