mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-25 01:39:56 +00:00
8c431f9ea6
Signed-off-by: songzhengteng <songzhengteng@huawei.com>
40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
# Run command below to format a file
|
||
# clang-format -i --style=file <file>
|
||
|
||
# complete clang-format rule, reference:
|
||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||
|
||
# WebKit format rule details, reference:
|
||
# https://webkit.org/code-style-guidelines/
|
||
# https://gitee.com/mirrors/WebKit/blob/main/.clang-format
|
||
BasedOnStyle: Webkit
|
||
# works on C and C++ files
|
||
Language: Cpp
|
||
|
||
PointerAlignment: Right
|
||
AlignTrailingComments: true
|
||
AlignConsecutiveMacros: Consecutive
|
||
# case statements indent one layer
|
||
IndentCaseLabels: true
|
||
BreakBeforeBinaryOperators: None
|
||
SpaceBeforeParens: ControlStatementsExceptControlMacros
|
||
SpacesInCStyleCastParentheses: false
|
||
AlignEscapedNewlines: Left
|
||
NamespaceIndentation: None
|
||
FixNamespaceComments: true
|
||
BreakConstructorInitializers: AfterColon
|
||
AlignArrayOfStructures: Left
|
||
AllowShortFunctionsOnASingleLine: Empty
|
||
AllowShortLambdasOnASingleLine: Empty
|
||
AlwaysBreakTemplateDeclarations: true
|
||
BreakBeforeTernaryOperators: false
|
||
SpaceAroundPointerQualifiers: Both
|
||
# iterator macros declaretion,avoid being treated as function call
|
||
ForEachMacros:
|
||
- 'LIST_FOR_EACH_ENTRY'
|
||
- 'LIST_FOR_EACH_ENTRY_SAFE'
|
||
- 'LIST_FOR_EACH'
|
||
- 'LIST_FOR_EACH_SAFE'
|
||
SortIncludes: CaseInsensitive
|
||
AllowShortEnumsOnASingleLine: false
|
||
ColumnLimit: 120 |