Skip to content

Commit 6cc800a

Browse files
committed
initial 23.6
1 parent d98b7d7 commit 6cc800a

File tree

24,242 files changed

+2750798
-2043
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

24,242 files changed

+2750798
-2043
lines changed

.clang-format

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
BasedOnStyle: WebKit
2+
Language: Cpp
3+
AlignAfterOpenBracket: AlwaysBreak
4+
BreakBeforeBraces: Custom
5+
BraceWrapping:
6+
AfterClass: true
7+
AfterControlStatement: true
8+
AfterEnum: true
9+
AfterFunction: true
10+
AfterNamespace: true
11+
AfterStruct: true
12+
AfterUnion: true
13+
BeforeCatch: true
14+
BeforeElse: true
15+
BeforeLambdaBody: true
16+
IndentBraces: false
17+
BreakConstructorInitializersBeforeComma: false
18+
Cpp11BracedListStyle: true
19+
ColumnLimit: 140
20+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
21+
ExperimentalAutoDetectBinPacking: true
22+
UseTab: Never
23+
TabWidth: 4
24+
Standard: Cpp11
25+
PointerAlignment: Middle
26+
MaxEmptyLinesToKeep: 2
27+
KeepEmptyLinesAtTheStartOfBlocks: false
28+
AllowShortFunctionsOnASingleLine: InlineOnly
29+
AlwaysBreakTemplateDeclarations: true
30+
IndentCaseLabels: true
31+
SpaceAfterTemplateKeyword: true
32+
SpaceBeforeCpp11BracedList: false
33+
SortIncludes: true
34+
IndentPPDirectives: AfterHash
35+
IncludeCategories:
36+
- Regex: '^<[a-z_]+>'
37+
Priority: 1
38+
- Regex: '^<[a-z_]+.h>'
39+
Priority: 2
40+
- Regex: '^["<](common|ext|mysqlxx|daemon|zkutil)/'
41+
Priority: 90
42+
- Regex: '^["<](DB)/'
43+
Priority: 100
44+
- Regex: '^["<](Poco)/'
45+
Priority: 50
46+
- Regex: '^"'
47+
Priority: 110
48+
- Regex: '/'
49+
Priority: 30
50+
- Regex: '.*'
51+
Priority: 40
52+
ReflowComments: false
53+
AlignEscapedNewlinesLeft: false
54+
AlignEscapedNewlines: DontAlign
55+
AlignTrailingComments: false
56+
57+
# Not changed:
58+
AccessModifierOffset: -4
59+
AlignConsecutiveAssignments: false
60+
AlignOperands: false
61+
AllowAllParametersOfDeclarationOnNextLine: true
62+
AllowShortBlocksOnASingleLine: false
63+
AllowShortCaseLabelsOnASingleLine: false
64+
AllowShortIfStatementsOnASingleLine: false
65+
AllowShortLoopsOnASingleLine: false
66+
AlwaysBreakAfterDefinitionReturnType: None
67+
AlwaysBreakBeforeMultilineStrings: false
68+
BinPackArguments: false
69+
BinPackParameters: false
70+
BreakBeforeBinaryOperators: All
71+
BreakBeforeTernaryOperators: true
72+
CommentPragmas: '^ IWYU pragma:'
73+
ConstructorInitializerIndentWidth: 4
74+
ContinuationIndentWidth: 4
75+
DerivePointerAlignment: false
76+
DisableFormat: false
77+
IndentRequiresClause: false
78+
IndentWidth: 4
79+
IndentWrappedFunctionNames: false
80+
MacroBlockBegin: ''
81+
MacroBlockEnd: ''
82+
NamespaceIndentation: Inner
83+
ObjCBlockIndentWidth: 4
84+
ObjCSpaceAfterProperty: true
85+
ObjCSpaceBeforeProtocolList: true
86+
PenaltyBreakBeforeFirstCallParameter: 19
87+
PenaltyBreakComment: 300
88+
PenaltyBreakFirstLessLess: 120
89+
PenaltyBreakString: 1000
90+
PenaltyExcessCharacter: 1000000
91+
PenaltyReturnTypeOnItsOwnLine: 60
92+
SpaceAfterCStyleCast: false
93+
SpaceBeforeAssignmentOperators: true
94+
SpaceBeforeParens: ControlStatements
95+
SpaceInEmptyParentheses: false
96+
SpacesBeforeTrailingComments: 1
97+
SpacesInContainerLiterals: true
98+
SpacesInCStyleCastParentheses: false
99+
SpacesInParentheses: false
100+
SpacesInSquareBrackets: false

.clang-tidy

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# To run clang-tidy from CMake, build ClickHouse with -DENABLE_CLANG_TIDY=1. To show all warnings, it is
2+
# recommended to pass "-k0" to Ninja.
3+
4+
# Enable all checks + disable selected checks. Feel free to remove disabled checks from below list if
5+
# a) the new check is not controversial (this includes many checks in readability-* and google-*) or
6+
# b) too noisy (checks with > 100 new warnings are considered noisy, this includes e.g. cppcoreguidelines-*).
7+
8+
# TODO Let clang-tidy check headers in further directories
9+
# --> HeaderFilterRegex: '^.*/(src|base|programs|utils)/.*(h|hpp)$'
10+
HeaderFilterRegex: '^.*/(base)/.*(h|hpp)$'
11+
12+
Checks: '*,
13+
-abseil-*,
14+
15+
-altera-*,
16+
17+
-android-*,
18+
19+
-bugprone-assignment-in-if-condition,
20+
-bugprone-branch-clone,
21+
-bugprone-easily-swappable-parameters,
22+
-bugprone-exception-escape,
23+
-bugprone-implicit-widening-of-multiplication-result,
24+
-bugprone-narrowing-conversions,
25+
-bugprone-not-null-terminated-result,
26+
-bugprone-reserved-identifier, # useful but too slow, TODO retry when https://reviews.llvm.org/rG1c282052624f9d0bd273bde0b47b30c96699c6c7 is merged
27+
-bugprone-unchecked-optional-access,
28+
29+
-cert-dcl16-c,
30+
-cert-dcl37-c,
31+
-cert-dcl51-cpp,
32+
-cert-err58-cpp,
33+
-cert-msc32-c,
34+
-cert-msc51-cpp,
35+
-cert-oop54-cpp,
36+
-cert-oop57-cpp,
37+
38+
-clang-analyzer-optin.performance.Padding,
39+
-clang-analyzer-optin.portability.UnixAPI,
40+
-clang-analyzer-security.insecureAPI.bzero,
41+
-clang-analyzer-security.insecureAPI.strcpy,
42+
43+
-cppcoreguidelines-avoid-c-arrays,
44+
-cppcoreguidelines-avoid-const-or-ref-data-members,
45+
-cppcoreguidelines-avoid-do-while,
46+
-cppcoreguidelines-avoid-goto,
47+
-cppcoreguidelines-avoid-magic-numbers,
48+
-cppcoreguidelines-avoid-non-const-global-variables,
49+
-cppcoreguidelines-explicit-virtual-functions,
50+
-cppcoreguidelines-init-variables,
51+
-cppcoreguidelines-interfaces-global-init,
52+
-cppcoreguidelines-macro-usage,
53+
-cppcoreguidelines-narrowing-conversions,
54+
-cppcoreguidelines-no-malloc,
55+
-cppcoreguidelines-non-private-member-variables-in-classes,
56+
-cppcoreguidelines-owning-memory,
57+
-cppcoreguidelines-prefer-member-initializer,
58+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
59+
-cppcoreguidelines-pro-bounds-constant-array-index,
60+
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
61+
-cppcoreguidelines-pro-type-const-cast,
62+
-cppcoreguidelines-pro-type-cstyle-cast,
63+
-cppcoreguidelines-pro-type-member-init,
64+
-cppcoreguidelines-pro-type-reinterpret-cast,
65+
-cppcoreguidelines-pro-type-static-cast-downcast,
66+
-cppcoreguidelines-pro-type-union-access,
67+
-cppcoreguidelines-pro-type-vararg,
68+
-cppcoreguidelines-slicing,
69+
-cppcoreguidelines-special-member-functions,
70+
71+
-darwin-*,
72+
73+
-fuchsia-*,
74+
75+
-google-build-using-namespace,
76+
-google-readability-braces-around-statements,
77+
-google-readability-casting,
78+
-google-readability-function-size,
79+
-google-readability-namespace-comments,
80+
-google-readability-todo,
81+
-google-upgrade-googletest-case,
82+
83+
-hicpp-avoid-c-arrays,
84+
-hicpp-avoid-goto,
85+
-hicpp-braces-around-statements,
86+
-hicpp-explicit-conversions,
87+
-hicpp-function-size,
88+
-hicpp-member-init,
89+
-hicpp-move-const-arg,
90+
-hicpp-multiway-paths-covered,
91+
-hicpp-named-parameter,
92+
-hicpp-no-array-decay,
93+
-hicpp-no-assembler,
94+
-hicpp-no-malloc,
95+
-hicpp-signed-bitwise,
96+
-hicpp-special-member-functions,
97+
-hicpp-uppercase-literal-suffix,
98+
-hicpp-use-auto,
99+
-hicpp-use-emplace,
100+
-hicpp-vararg,
101+
102+
-linuxkernel-*,
103+
104+
-llvm-*,
105+
106+
-llvmlibc-*,
107+
108+
-openmp-*,
109+
110+
-misc-const-correctness,
111+
-misc-no-recursion,
112+
-misc-non-private-member-variables-in-classes,
113+
-misc-confusable-identifiers, # useful but slooow
114+
-misc-use-anonymous-namespace,
115+
116+
-modernize-avoid-c-arrays,
117+
-modernize-concat-nested-namespaces,
118+
-modernize-macro-to-enum,
119+
-modernize-pass-by-value,
120+
-modernize-return-braced-init-list,
121+
-modernize-use-auto,
122+
-modernize-use-default-member-init,
123+
-modernize-use-emplace,
124+
-modernize-use-nodiscard,
125+
-modernize-use-override,
126+
-modernize-use-trailing-return-type,
127+
128+
-performance-inefficient-string-concatenation,
129+
-performance-no-int-to-ptr,
130+
-performance-unnecessary-value-param,
131+
132+
-portability-simd-intrinsics,
133+
134+
-readability-braces-around-statements,
135+
-readability-convert-member-functions-to-static,
136+
-readability-else-after-return,
137+
-readability-function-cognitive-complexity,
138+
-readability-function-size,
139+
-readability-identifier-length,
140+
-readability-identifier-naming, # useful but too slow
141+
-readability-implicit-bool-conversion,
142+
-readability-isolate-declaration,
143+
-readability-magic-numbers,
144+
-readability-named-parameter,
145+
-readability-redundant-declaration,
146+
-readability-simplify-boolean-expr,
147+
-readability-static-accessed-through-instance,
148+
-readability-suspicious-call-argument,
149+
-readability-uppercase-literal-suffix,
150+
-readability-use-anyofallof,
151+
152+
-zircon-*,
153+
'
154+
155+
WarningsAsErrors: '*'
156+
157+
CheckOptions:
158+
readability-identifier-naming.ClassCase: CamelCase
159+
readability-identifier-naming.EnumCase: CamelCase
160+
readability-identifier-naming.LocalVariableCase: lower_case
161+
readability-identifier-naming.StaticConstantCase: aNy_CasE
162+
readability-identifier-naming.MemberCase: lower_case
163+
readability-identifier-naming.PrivateMemberPrefix: ''
164+
readability-identifier-naming.ProtectedMemberPrefix: ''
165+
readability-identifier-naming.PublicMemberCase: lower_case
166+
readability-identifier-naming.MethodCase: camelBack
167+
readability-identifier-naming.PrivateMethodPrefix: ''
168+
readability-identifier-naming.ProtectedMethodPrefix: ''
169+
readability-identifier-naming.ParameterPackCase: lower_case
170+
readability-identifier-naming.StructCase: CamelCase
171+
readability-identifier-naming.TemplateTemplateParameterCase: CamelCase
172+
readability-identifier-naming.TemplateParameterCase: lower_case
173+
readability-identifier-naming.TypeTemplateParameterCase: CamelCase
174+
readability-identifier-naming.TypedefCase: CamelCase
175+
readability-identifier-naming.UnionCase: CamelCase
176+
modernize-loop-convert.UseCxx20ReverseRanges: false
177+
performance-move-const-arg.CheckTriviallyCopyableMove: false
178+
# Workaround clang-tidy bug: https://github.com/llvm/llvm-project/issues/46097
179+
readability-identifier-naming.TypeTemplateParameterIgnoredRegexp: expr-type
180+
cppcoreguidelines-avoid-do-while.IgnoreMacros: true

.clangd

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Diagnostics:
2+
# clangd does parse .clang-tidy, but some checks are too slow to run in
3+
# clang-tidy build, so let's enable them explicitly for clangd at least.
4+
ClangTidy:
5+
# The following checks had been disabled due to slowliness with C++23,
6+
# for more details see [1].
7+
#
8+
# [1]: https://github.com/llvm/llvm-project/issues/61418
9+
#
10+
# But the code base had been written in a style that had been checked
11+
# by this check, so at least, let's enable it for clangd.
12+
Add: [
13+
# configured in .clang-tidy
14+
readability-identifier-naming,
15+
bugprone-reserved-identifier,
16+
]

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
root = true
2+
3+
# Unix-style newlines with a newline ending every file
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
8+
9+
# Matches multiple files with brace expansion notation
10+
# Set default charset
11+
[*.{c,cpp,cxx,h,hpp,hxx,py,cmake}]
12+
charset = utf-8
13+
indent_style = space
14+
indent_size = 4
15+
trim_trailing_whitespace = true
16+
17+
[CMakeLists.txt]
18+
charset = utf-8
19+
indent_style = space
20+
indent_size = 4
21+
trim_trailing_whitespace = true

.exrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
au BufRead,BufNewFile * set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab tags=tags,../tags

.git-blame-ignore-revs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This is a file that can be used by git-blame to ignore some revisions.
2+
# (git 2.23+, released in August 2019)
3+
#
4+
# Can be configured as follow:
5+
#
6+
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
7+
#
8+
# For more information you can look at git-blame(1) man page.
9+
10+
# Changed tabs to spaces in code [#CLICKHOUSE-3]
11+
137ad95929ee016cc6d3c03bccb5586941c163ff
12+
13+
# dbms/ → src/
14+
# (though it is unlikely that you will see it in blame)
15+
06446b4f08a142d6f1bc30664c47ded88ab51782

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contrib/* linguist-vendored
2+
*.h linguist-language=C++
3+
tests/queries/0_stateless/data_json/* binary
4+
tests/queries/0_stateless/*.reference -crlf

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.github/ISSUE_TEMPLATE/10_question.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Question
3+
about: Ask a question about ClickHouse
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
> Make sure to check documentation https://clickhouse.com/docs/en/ first. If the question is concise and probably has a short answer, asking it in [community Slack](https://join.slack.com/t/clickhousedb/shared_invite/zt-1gh9ds7f4-PgDhJAaF8ad5RbWBAAjzFg) is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse
11+
12+
> If you still prefer GitHub issues, remove all this text and ask your question here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for ClickHouse
4+
title: ''
5+
labels: feature
6+
assignees: ''
7+
8+
---
9+
10+
> (you don't have to strictly follow this form)
11+
12+
**Use case**
13+
14+
> A clear and concise description of what is the intended usage scenario is.
15+
16+
**Describe the solution you'd like**
17+
18+
> A clear and concise description of what you want to happen.
19+
20+
**Describe alternatives you've considered**
21+
22+
> A clear and concise description of any alternative solutions or features you've considered.
23+
24+
**Additional context**
25+
26+
> Add any other context or screenshots about the feature request here.

0 commit comments

Comments
 (0)