-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add clang-format and clang-tidy file
- Loading branch information
1 parent
255a82a
commit 1153f86
Showing
2 changed files
with
126 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,76 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
IndentWidth: 2 | ||
TabWidth: 2 | ||
UseTab: Never | ||
|
||
|
||
# General formatting | ||
AccessModifierOffset: -2 | ||
MaxEmptyLinesToKeep: 1 | ||
# BreakBeforeBraces: Allman | ||
|
||
# Line length | ||
ColumnLimit: 80 | ||
|
||
# Bracing style | ||
BreakBeforeBraces: Custom | ||
BraceWrapping: | ||
AfterCaseLabel: true | ||
AfterControlStatement: Never | ||
AfterFunction: true | ||
AfterStruct: false | ||
AfterUnion: false | ||
AfterExternBlock: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
SplitEmptyFunction: false | ||
|
||
# Use of spaces | ||
SpacesBeforeTrailingComments: 1 | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
|
||
# Use of comments | ||
CommentPragmas: "^ IWYU pragma:" | ||
|
||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: true | ||
AlignConsecutiveMacros: true | ||
AlignEscapedNewlines: Right | ||
AlignOperands: true | ||
AlignTrailingComments: true | ||
AllowAllArgumentsOnNextLine: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: Empty | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortLoopsOnASingleLine: false | ||
AllowShortEnumsOnASingleLine: false | ||
AlwaysBreakBeforeMultilineStrings: false | ||
AlwaysBreakTemplateDeclarations: No | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakBeforeTernaryOperators: true | ||
BreakStringLiterals: true | ||
Cpp11BracedListStyle: true | ||
IncludeBlocks: Regroup | ||
IndentCaseLabels: true | ||
IndentGotoLabels: false | ||
IndentPPDirectives: None | ||
IndentWrappedFunctionNames: true | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
PointerAlignment: Right | ||
ReflowComments: false | ||
SortIncludes: false | ||
SpaceAfterCStyleCast: true | ||
SpaceAfterLogicalNot: false | ||
SpaceBeforeRangeBasedForLoopColon: true | ||
SpaceBeforeSquareBrackets: false | ||
SpaceInEmptyBlock: false | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInConditionalStatement: false | ||
SpacesInContainerLiterals: false |
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,50 @@ | ||
Checks: > | ||
-*, | ||
readability-identifier-naming, | ||
readability-magic-numbers, | ||
readability-braces-around-statements | ||
WarningsAsErrors: > | ||
readability-identifier-naming, | ||
readability-magic-numbers, | ||
readability-braces-around-statements | ||
HeaderFilterRegex: '' | ||
FormatStyle: none | ||
InheritParentConfig: true | ||
User: user | ||
CheckOptions: | ||
- key: readability-identifier-naming.VariableCase | ||
value: lower_case | ||
- key: readability-identifier-naming.GlobalConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.GlobalConstantPrefix | ||
value: SL_ | ||
- key: readability-identifier-naming.ConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.ConstantPrefix | ||
value: SL_ | ||
- key: readability-identifier-naming.EnumConstantCase | ||
value: UPPER_CASE | ||
- key: readability-identifier-naming.EnumConstantPrefix | ||
value: SL_ | ||
- key: readability-identifier-naming.EnumCase | ||
value: lower_case | ||
- key: readability-identifier-naming.EnumPrefix | ||
value: sl_ | ||
- key: readability-identifier-naming.FunctionIgnoredRegexp | ||
value: 'sli_.*' | ||
- key: readability-identifier-naming.FunctionCase | ||
value: lower_case | ||
- key: readability-identifier-naming.FunctionPrefix | ||
value: 'sl_' | ||
- key: readability-identifier-naming.StructCase | ||
value: lower_case | ||
- key: readability-identifier-naming.StructPrefix | ||
value: 'sl_' | ||
- key: readability-identifier-naming.StructMemberCase | ||
value: lower_case | ||
- key: readability-identifier-naming.TypedefCase | ||
value: lower_case | ||
- key: readability-identifier-naming.TypedefPrefix | ||
value: 'sl_' |