Skip to content

Commit a397f18

Browse files
committed
Merge remote-tracking branch 'origin/master' into analyzer-hypothesis-index
2 parents 500faf4 + 6c5057c commit a397f18

8,884 files changed

Lines changed: 387865 additions & 158600 deletions

File tree

Some content is hidden

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

.clang-format

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ ConstructorInitializerIndentWidth: 4
7474
ContinuationIndentWidth: 4
7575
DerivePointerAlignment: false
7676
DisableFormat: false
77+
IndentRequiresClause: false
7778
IndentWidth: 4
7879
IndentWrappedFunctionNames: false
7980
MacroBlockBegin: ''
8081
MacroBlockEnd: ''
81-
NamespaceIndentation: Inner
82+
NamespaceIndentation: None
8283
ObjCBlockIndentWidth: 4
8384
ObjCSpaceAfterProperty: true
8485
ObjCSpaceBeforeProtocolList: true
@@ -88,6 +89,7 @@ PenaltyBreakFirstLessLess: 120
8889
PenaltyBreakString: 1000
8990
PenaltyExcessCharacter: 1000000
9091
PenaltyReturnTypeOnItsOwnLine: 60
92+
RemoveBracesLLVM: true
9193
SpaceAfterCStyleCast: false
9294
SpaceBeforeAssignmentOperators: true
9395
SpaceBeforeParens: ControlStatements

.clang-tidy

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
# a) the new check is not controversial (this includes many checks in readability-* and google-*) or
66
# b) too noisy (checks with > 100 new warnings are considered noisy, this includes e.g. cppcoreguidelines-*).
77

8+
# TODO: Once clang(-tidy) 17 is the minimum, we can convert this list to YAML
9+
# See https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/ReleaseNotes.html#improvements-to-clang-tidy
10+
811
# TODO Let clang-tidy check headers in further directories
912
# --> HeaderFilterRegex: '^.*/(src|base|programs|utils)/.*(h|hpp)$'
1013
HeaderFilterRegex: '^.*/(base)/.*(h|hpp)$'
@@ -35,38 +38,9 @@ Checks: '*,
3538
-cert-oop54-cpp,
3639
-cert-oop57-cpp,
3740
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,
41+
-clang-analyzer-unix.Malloc,
42+
43+
-cppcoreguidelines-*, # impractical in a codebase as large as ClickHouse, also slow
7044
7145
-darwin-*,
7246
@@ -78,7 +52,6 @@ Checks: '*,
7852
-google-readability-function-size,
7953
-google-readability-namespace-comments,
8054
-google-readability-todo,
81-
-google-upgrade-googletest-case,
8255
8356
-hicpp-avoid-c-arrays,
8457
-hicpp-avoid-goto,
@@ -108,6 +81,7 @@ Checks: '*,
10881
-openmp-*,
10982
11083
-misc-const-correctness,
84+
-misc-include-cleaner, # useful but far too many occurrences
11185
-misc-no-recursion,
11286
-misc-non-private-member-variables-in-classes,
11387
-misc-confusable-identifiers, # useful but slooow
@@ -127,10 +101,12 @@ Checks: '*,
127101
128102
-performance-inefficient-string-concatenation,
129103
-performance-no-int-to-ptr,
104+
-performance-avoid-endl,
130105
-performance-unnecessary-value-param,
131106
132107
-portability-simd-intrinsics,
133108
109+
-readability-avoid-unconditional-preprocessor-if,
134110
-readability-braces-around-statements,
135111
-readability-convert-member-functions-to-static,
136112
-readability-else-after-return,
@@ -154,6 +130,13 @@ Checks: '*,
154130

155131
WarningsAsErrors: '*'
156132

133+
ExtraArgs:
134+
# clang-tidy 17 started to complain (for unknown reasons) that various pragmas are unknown ("clang-diagnostic-unknown-pragmas").
135+
# This is technically a compiler error, not a clang-tidy error. We could litter the code base with more pragmas that suppress
136+
# this error but it is better to pass the following flag to the compiler:
137+
- '-Wno-unknown-pragmas'
138+
- '-Wno-unused-command-line-argument' # similar issue
139+
157140
CheckOptions:
158141
readability-identifier-naming.ClassCase: CamelCase
159142
readability-identifier-naming.EnumCase: CamelCase

.github/ISSUE_TEMPLATE/85_bug-report.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ assignees: ''
77

88
---
99

10+
> Please make sure that the version you're using is still supported (you can find the list [here](https://github.com/ClickHouse/ClickHouse/blob/master/SECURITY.md#scope-and-supported-versions)).
11+
1012
> You have to provide the following information whenever possible.
1113
1214
**Describe what's wrong**
@@ -21,8 +23,7 @@ assignees: ''
2123

2224
**Enable crash reporting**
2325

24-
> If possible, change "enabled" to true in "send_crash_reports" section in `config.xml`:
25-
26+
> Change "enabled" to true in "send_crash_reports" section in `config.xml`:
2627
```
2728
<send_crash_reports>
2829
<!-- Changing <enabled> to true allows sending crash reports to -->

.github/actions/clean/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Clean runner
2+
description: Clean the runner's temp path on ending
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Clean
7+
shell: bash
8+
run: |
9+
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
10+
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
11+
sudo rm -fr "${{runner.temp}}"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Common setup
2+
description: Setup necessary environments
3+
inputs:
4+
job_type:
5+
description: the name to use in the TEMP_PATH and REPO_COPY
6+
default: common
7+
type: string
8+
nested_job:
9+
description: the fuse for unintended use inside of the reusable callable jobs
10+
default: true
11+
type: boolean
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Setup and check ENV
16+
shell: bash
17+
run: |
18+
echo "Setup the common ENV variables"
19+
cat >> "$GITHUB_ENV" << 'EOF'
20+
TEMP_PATH=${{runner.temp}}/${{inputs.job_type}}
21+
EOF
22+
if [ -z "${{env.GITHUB_JOB_OVERRIDDEN}}" ] && [ "true" == "${{inputs.nested_job}}" ]; then
23+
echo "The GITHUB_JOB_OVERRIDDEN ENV is unset, and must be set for the nested jobs"
24+
exit 1
25+
fi
26+
- name: Setup $TEMP_PATH
27+
shell: bash
28+
run: |
29+
# to remove every leftovers
30+
sudo rm -fr "$TEMP_PATH" && mkdir -p "$TEMP_PATH"

.github/workflows/auto_release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: AutoRelease
2+
3+
env:
4+
# Force the stdout and stderr streams to be unbuffered
5+
PYTHONUNBUFFERED: 1
6+
7+
concurrency:
8+
group: auto-release
9+
on: # yamllint disable-line rule:truthy
10+
# schedule:
11+
# - cron: '0 10-16 * * 1-5'
12+
workflow_dispatch:
13+
14+
jobs:
15+
CherryPick:
16+
runs-on: [self-hosted, style-checker-aarch64]
17+
steps:
18+
- name: Set envs
19+
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#multiline-strings
20+
run: |
21+
cat >> "$GITHUB_ENV" << 'EOF'
22+
TEMP_PATH=${{runner.temp}}/cherry_pick
23+
ROBOT_CLICKHOUSE_SSH_KEY<<RCSK
24+
${{secrets.ROBOT_CLICKHOUSE_SSH_KEY}}
25+
RCSK
26+
REPO_OWNER=ClickHouse
27+
REPO_NAME=ClickHouse
28+
REPO_TEAM=core
29+
EOF
30+
- name: Check out repository code
31+
uses: ClickHouse/checkout@v1
32+
with:
33+
clear-repository: true
34+
token: ${{secrets.ROBOT_CLICKHOUSE_COMMIT_TOKEN}}
35+
fetch-depth: 0
36+
- name: Auto-release
37+
run: |
38+
cd "$GITHUB_WORKSPACE/tests/ci"
39+
python3 auto_release.py --release-after-days=3
40+
- name: Cleanup
41+
if: always()
42+
run: |
43+
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
44+
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
45+
sudo rm -fr "$TEMP_PATH"

0 commit comments

Comments
 (0)