Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Clang Format file #1284

Merged
merged 5 commits into from
Nov 27, 2023
Merged
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
70 changes: 70 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
BasedOnStyle: Google
---
Language: Cpp
# Modifications to the style for Plasma go here
IndentWidth: 4
AccessModifierOffset: -4
ColumnLimit: 0
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
IndentAccessModifiers: false
AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveAssignments:
Enabled: False
ReflowComments: true
LambdaBodyIndentation: OuterScope
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
PackConstructorInitializers: CurrentLine
ObjCBlockIndentWidth: 4
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesBeforeTrailingComments: 1
---
Language: ObjC
# Obj-C specific settings go here
IndentWidth: 4
AccessModifierOffset: -4
ColumnLimit: 0
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: false
BeforeElse: false
IndentBraces: false
IndentAccessModifiers: false
AlignConsecutiveDeclarations: AcrossComments
AlignConsecutiveAssignments:
Enabled: False
ReflowComments: true
LambdaBodyIndentation: OuterScope
AllowShortBlocksOnASingleLine: true
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
PackConstructorInitializers: CurrentLine
ObjCBlockIndentWidth: 4
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesBeforeTrailingComments: 1