Skip to content

Commit 84b8080

Browse files
committed
update clang-format and clang-tidy files
1 parent fdb7a7f commit 84b8080

2 files changed

Lines changed: 33 additions & 22 deletions

File tree

.clang-format

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
AccessModifierOffset: -2
22
AlignAfterOpenBracket: DontAlign
3-
AlignConsecutiveAssignments: false
4-
AlignConsecutiveDeclarations: false
3+
AlignConsecutiveAssignments: None
4+
AlignConsecutiveDeclarations: None
55
AlignEscapedNewlines: Left
66
AlignOperands: true
77
AlignTrailingComments: false
88
AllowAllParametersOfDeclarationOnNextLine: false
9-
AllowShortBlocksOnASingleLine: true
9+
AllowShortBlocksOnASingleLine: Always
1010
AllowShortCaseLabelsOnASingleLine: false
1111
AllowShortFunctionsOnASingleLine: All
1212
AllowShortIfStatementsOnASingleLine: true
1313
AllowShortLoopsOnASingleLine: true
1414
AlwaysBreakAfterDefinitionReturnType: None
1515
AlwaysBreakAfterReturnType: None
1616
AlwaysBreakBeforeMultilineStrings: true
17-
AlwaysBreakTemplateDeclarations: false
17+
AlwaysBreakTemplateDeclarations: No
1818
BinPackArguments: false
1919
BinPackParameters: false
2020
BraceWrapping:
@@ -40,7 +40,7 @@ BreakBeforeTernaryOperators: true
4040
BreakConstructorInitializers: BeforeColon
4141
BreakConstructorInitializersBeforeComma: false
4242
BreakStringLiterals: true
43-
ColumnLimit: 0
43+
ColumnLimit: 180
4444
CommentPragmas: '^ IWYU pragma:'
4545
CompactNamespaces: false
4646
ConstructorInitializerAllOnOneLineOrOnePerLine: false
@@ -52,19 +52,19 @@ DisableFormat: false
5252
ExperimentalAutoDetectBinPacking: true
5353
FixNamespaceComments: true
5454
ForEachMacros:
55-
- foreach
56-
- Q_FOREACH
57-
- BOOST_FOREACH
55+
- foreach
56+
- Q_FOREACH
57+
- BOOST_FOREACH
5858
IncludeCategories:
59-
- Priority: 2
60-
Regex: ^"(llvm|llvm-c|clang|clang-c)/
61-
- Priority: 3
62-
Regex: ^(<|"(gtest|gmock|isl|json)/)
63-
- Priority: 1
64-
Regex: .*
59+
- Priority: 2
60+
Regex: ^"(llvm|llvm-c|clang|clang-c)/
61+
- Priority: 3
62+
Regex: ^(<|"(gtest|gmock|isl|json)/)
63+
- Priority: 1
64+
Regex: .*
6565
IncludeIsMainRegex: (Test)?$
6666
IndentCaseLabels: false
67-
IndentWidth: 2
67+
IndentWidth: 4
6868
IndentWrappedFunctionNames: true
6969
JavaScriptQuotes: Leave
7070
JavaScriptWrapImports: true
@@ -79,7 +79,7 @@ ObjCSpaceAfterProperty: true
7979
ObjCSpaceBeforeProtocolList: false
8080
PointerAlignment: Right
8181
ReflowComments: true
82-
SortIncludes: false
82+
SortIncludes: CaseSensitive
8383
SortUsingDeclarations: false
8484
SpaceAfterCStyleCast: false
8585
SpaceAfterTemplateKeyword: false
@@ -92,7 +92,6 @@ SpacesInCStyleCastParentheses: false
9292
SpacesInContainerLiterals: true
9393
SpacesInParentheses: false
9494
SpacesInSquareBrackets: false
95-
Standard: Cpp11
95+
Standard: c++20
9696
TabWidth: 8
9797
UseTab: Never
98-

.clang-tidy

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
---
2-
Checks: '*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm*'
3-
WarningsAsErrors: '*'
2+
Checks: "*,
3+
-abseil-*,
4+
-altera-*,
5+
-android-*,
6+
-fuchsia-*,
7+
-google-*,
8+
-llvm*,
9+
-modernize-use-trailing-return-type,
10+
-zircon-*,
11+
-readability-else-after-return,
12+
-readability-static-accessed-through-instance,
13+
-readability-avoid-const-params-in-decls,
14+
-cppcoreguidelines-non-private-member-variables-in-classes,
15+
-misc-non-private-member-variables-in-classes,
16+
"
17+
WarningsAsErrors: ''
418
HeaderFilterRegex: ''
519
FormatStyle: none
6-
7-

0 commit comments

Comments
 (0)