aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralevitskii <alevitskii@yandex-team.com>2025-01-15 16:48:47 +0300
committeralevitskii <alevitskii@yandex-team.com>2025-01-15 17:33:15 +0300
commit7179d8d5e081a623dc8cf07f67805e1f98a3f66f (patch)
tree2fb4df3bc4e5c654cac0fdd5a18dd6ca6932873f
parent222b68506a961b9228b5b27e189521b4a408bec1 (diff)
downloadydb-7179d8d5e081a623dc8cf07f67805e1f98a3f66f.tar.gz
Add config18.clang-format resource
Add config18.clang-format resource commit_hash:3f1a46de28fdc91515a137edc34ffe43dd4738db
-rw-r--r--build/config/tests/cpp_style/config18.clang-format97
-rw-r--r--build/config/tests/cpp_style/ya.make1
2 files changed, 98 insertions, 0 deletions
diff --git a/build/config/tests/cpp_style/config18.clang-format b/build/config/tests/cpp_style/config18.clang-format
new file mode 100644
index 0000000000..b2d89e2e75
--- /dev/null
+++ b/build/config/tests/cpp_style/config18.clang-format
@@ -0,0 +1,97 @@
+Language: Cpp
+AccessModifierOffset: -4
+ConstructorInitializerIndentWidth: 4
+AlignEscapedNewlinesLeft: false
+AlignEscapedNewlines: Left
+AlignTrailingComments:
+ Kind: Always
+ OverEmptyLines: 0
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AlwaysBreakTemplateDeclarations: true
+AlwaysBreakBeforeMultilineStrings: false
+BreakBeforeBinaryOperators: false
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializersBeforeComma: true
+BinPackParameters: true
+ColumnLimit: 0
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+DerivePointerAlignment: false
+ExperimentalAutoDetectBinPacking: false
+IndentCaseLabels: true
+IndentWrappedFunctionNames: false
+IndentFunctionDeclarationAfterType: false
+MaxEmptyLinesToKeep: 1
+KeepEmptyLinesAtTheStartOfBlocks: false
+NamespaceIndentation: All
+FixNamespaceComments: true
+ShortNamespaceLines: 0
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PackConstructorInitializers: Never
+PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakComment: 300
+PenaltyBreakString: 1000
+PenaltyBreakFirstLessLess: 120
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 60
+PointerAlignment: Left
+SpacesBeforeTrailingComments: 1
+SpacesInSquareBrackets: false
+Cpp11BracedListStyle: true
+Standard: c++20
+IndentWidth: 4
+TabWidth: 4
+UseTab: Never
+BreakBeforeBraces: Attach
+InsertBraces: true
+
+# NB: BraceWrapping has no effect unless BreakBeforeBraces is set to Custom
+BraceWrapping:
+ AfterClass: false
+ AfterControlStatement: false
+ AfterEnum: false
+ AfterFunction: false
+ AfterNamespace: false
+ AfterObjCDeclaration: false
+ AfterStruct: false
+ AfterUnion: false
+ BeforeCatch: false
+ BeforeElse: false
+ IndentBraces: true
+
+SpacesInParentheses: false
+SpacesInAngles: false
+SpaceInEmptyParentheses: false
+SpacesInCStyleCastParentheses: false
+SpacesInContainerLiterals: true
+SpaceBeforeAssignmentOperators: true
+ContinuationIndentWidth: 4
+CommentPragmas: '^ IWYU pragma:'
+ForEachMacros: [
+ foreach,
+ Q_FOREACH,
+ BOOST_FOREACH,
+ # Is not a foreach, but correct formatting is achieved
+ Y_DEFER
+]
+IfMacros: [
+ with_lock # Is not an if, but correct formatting is achieved
+]
+SpaceBeforeParens: ControlStatements
+DisableFormat: false
+SortIncludes: false
+IndentPPDirectives: BeforeHash
+
+SpaceBeforeInheritanceColon: false
+NamespaceMacros: [Y_UNIT_TEST_SUITE]
+AttributeMacros: [Y_PRINTF_FORMAT, Y_NO_SANITIZE, Y_FORCE_INLINE, Y_NO_INLINE, Y_WARN_UNUSED_RESULT, Y_HIDDEN, Y_PUBLIC, Y_PURE_FUNCTION]
+IndentExternBlock: Indent
+TypenameMacros: [Y_THREAD, Y_STATIC_THREAD, Y_POD_THREAD, Y_POD_STATIC_THREAD]
+StatementAttributeLikeMacros: [ythrow]
+SpacesInLineCommentPrefix:
+ Minimum: 1
+ Maximum: 1
diff --git a/build/config/tests/cpp_style/ya.make b/build/config/tests/cpp_style/ya.make
index bb5fccd5ea..afb406a4fc 100644
--- a/build/config/tests/cpp_style/ya.make
+++ b/build/config/tests/cpp_style/ya.make
@@ -2,6 +2,7 @@ LIBRARY()
RESOURCE_FILES(
config.clang-format
+ config18.clang-format
)
END()