forked from OpenSC/OpenSC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: add clang-format formatting configuration
This allows for voluntary formatting with clang-format (or IDE tools like clang-format plugin for VS Code). Once a suitable formatting configuration is found, automatic formatting can be configured Tweaked by Jakub Jelen
- Loading branch information
1 parent
bc205ae
commit 70aac71
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
BasedOnStyle: LLVM | ||
# defaults from LLVM | ||
# BreakBeforeBraces: Attach | ||
# AllowShortIfStatementsOnASingleLine: Never | ||
# IndentCaseLabels: false | ||
# AlignAfterOpenBracket: Align | ||
# AlignTrailingComments: true | ||
# MaxEmptyLinesToKeep: 1 | ||
# ReflowComments: falsedefault | ||
# SortIncludes: true | ||
# BreakBeforeBinaryOperators: None | ||
# BraceWrapping: | ||
# AfterClass: false | ||
# AfterControlStatement: false | ||
# AfterFunction: false | ||
# AfterNamespace: false | ||
# BeforeCatch: false | ||
# BeforeElse: false | ||
# IndentBraces: false | ||
|
||
# OpenSC modifications | ||
TabWidth: 8 | ||
IndentWidth: 8 | ||
ContinuationIndentWidth: 16 | ||
AlignAfterOpenBracket: DontAlign | ||
UseTab: Always | ||
AlignConsecutiveMacros: true | ||
AlignEscapedNewlines: DontAlign | ||
AllowShortFunctionsOnASingleLine: None | ||
AlwaysBreakAfterReturnType: AllDefinitions | ||
## This prevents reflowing intentionally short lines but | ||
## it can be allowed only after we will have some baseline | ||
ColumnLimit: 0 | ||
#ColumnLimit: 110 | ||
IndentCaseBlocks: false | ||
AlignArrayOfStructures: Left | ||
|
||
BreakBeforeBraces: Custom | ||
BraceWrapping: | ||
AfterObjCDeclaration: true | ||
AfterUnion: true | ||
AfterFunction: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters