chore(git): add clang formatting files
This commit is contained in:
parent
63ed6f862f
commit
d285346662
37
.clang-format
Normal file
37
.clang-format
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: "Chromium"
|
||||||
|
Standard: Cpp20
|
||||||
|
|
||||||
|
# I like K&R, fight me
|
||||||
|
IndentWidth: 4
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
|
||||||
|
BraceWrapping:
|
||||||
|
AfterClass: false
|
||||||
|
AfterControlStatement: false
|
||||||
|
AfterEnum: false
|
||||||
|
AfterFunction: false
|
||||||
|
AfterNamespace: false
|
||||||
|
BeforeCatch: false
|
||||||
|
BeforeElse: false
|
||||||
|
IndentBraces: false
|
||||||
|
|
||||||
|
AllowShortEnumsOnASingleLine: false
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignTrailingComments: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AlignAfterOpenBracket: false
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
PenaltyBreakComment: 300
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PointerAlignment: Left
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
32
.clang-tidy
Normal file
32
.clang-tidy
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
Checks: >
|
||||||
|
-*,
|
||||||
|
readability-*,
|
||||||
|
modernize-*,
|
||||||
|
cppcoreguidelines-*,
|
||||||
|
performance-*,
|
||||||
|
bugprone-*,
|
||||||
|
clang-analyzer-*,
|
||||||
|
misc-*,
|
||||||
|
google-*,
|
||||||
|
cert-*,
|
||||||
|
portability-*,
|
||||||
|
cppcoreguidelines-pro-bounds-array-to-pointer-decay
|
||||||
|
|
||||||
|
WarningsAsErrors: ''
|
||||||
|
HeaderFilterRegex: '.*'
|
||||||
|
FormatStyle: none
|
||||||
|
User: ''
|
||||||
|
CheckOptions:
|
||||||
|
- key: readability-identifier-naming.VariableCase
|
||||||
|
value: lower_case
|
||||||
|
- key: readability-identifier-naming.FunctionCase
|
||||||
|
value: CamelCase
|
||||||
|
- key: modernize-use-auto
|
||||||
|
value: 0
|
||||||
|
- key: modernize-use-nullptr
|
||||||
|
value: 1
|
||||||
|
- key: cppcoreguidelines-non-private-member-variables-in-classes
|
||||||
|
value: 1
|
||||||
|
- key: modernize-use-override
|
||||||
|
value: 1
|
Loading…
x
Reference in New Issue
Block a user