Add docker for style check

This commit is contained in:
Yatsishin Ilya 2020-08-14 16:09:23 +03:00
parent 09a72d0c64
commit ab337b243a
3 changed files with 12 additions and 6 deletions

View File

@ -92,6 +92,10 @@
"name": "yandex/clickhouse-fasttest",
"dependent": []
},
"docker/test/style": {
"name": "yandex/clickhouse-style-test",
"dependent": []
},
"docker/test/integration/s3_proxy": {
"name": "yandex/clickhouse-s3-proxy",
"dependent": []

View File

@ -0,0 +1,8 @@
# docker build -t yandex/clickhouse-style-test .
FROM ubuntu:20.04
RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes shellcheck libxml2-utils git
CMD cd /ClickHouse/utils/check-style && ./check-style -n | tee /test_output/style_output.txt && \
./check-duplicate-includes.sh | tee /test_output/duplicate_output.txt

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
ROOT_PATH=$(git rev-parse --show-toplevel)
# Find duplicate include directives
find $ROOT_PATH/{src,base,programs,utils} -name '*.h' -or -name '*.cpp' | while read file; do grep -P '^#include ' $file | sort | uniq -c | grep -v -P '^\s+1\s' && echo $file; done