Merge pull request #13513 from ClickHouse/codespell-2

Enable codespell
This commit is contained in:
alexey-milovidov 2020-08-16 16:28:37 +03:00 committed by GitHub
commit 810829d5e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 7 deletions

View File

@ -2,7 +2,7 @@ Go to https://www.monetdb.org/
The graphical design of the website is a bit old-fashioned but I do not afraid.
Dowload now.
Download now.
Latest binary releases.
Ubuntu & Debian.
@ -1103,7 +1103,7 @@ Ok, it's doing something at least for twenty minues...
clk: 28:02 min
```
Finally it has loaded data successfuly in 28 minutes. It's not fast - just below 60 000 rows per second.
Finally it has loaded data successfully in 28 minutes. It's not fast - just below 60 000 rows per second.
But the second query from the test does not work:

View File

@ -1,7 +1,7 @@
# docker build -t yandex/clickhouse-style-test .
# 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
RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes shellcheck libxml2-utils git python3-pip && pip3 install codespell
CMD cd /ClickHouse/utils/check-style && ./check-style -n | tee /test_output/style_output.txt && \

View File

@ -356,7 +356,7 @@ int Server::main(const std::vector<std::string> & /*args*/)
std::string path = getCanonicalPath(config().getString("path", DBMS_DEFAULT_PATH));
std::string default_database = config().getString("default_database", "default");
/// Check that the process' user id matches the owner of the data.
/// Check that the process user id matches the owner of the data.
const auto effective_user_id = geteuid();
struct stat statbuf;
if (stat(path.c_str(), &statbuf) == 0 && effective_user_id != statbuf.st_uid)

View File

@ -20,7 +20,7 @@ static bool check()
/// as soon as the throwing thread executed.
/// This innocent thread may or may not be executed, the following possibilities exist:
/// 1. The throwing thread has already throwed exception and the attempt to schedule the innocent thread will rethrow it.
/// 1. The throwing thread has already thrown exception and the attempt to schedule the innocent thread will rethrow it.
/// 2. The throwing thread has not executed, the innocent thread will be scheduled and executed.
/// 3. The throwing thread has not executed, the innocent thread will be scheduled but before it will be executed,
/// the throwing thread will be executed and throw exception and it will prevent starting of execution of the innocent thread

View File

@ -74,7 +74,7 @@ static OutputPort * uniteTotals(const OutputPortRawPtrs & ports, const Block & h
if (ports.size() == 1)
return ports.front();
/// Calculate totals fro several streams.
/// Calculate totals from several streams.
/// Take totals from first sources which has any, skip others.
/// ->> Concat -> Limit

View File

@ -69,6 +69,10 @@ find $ROOT_PATH -name '.gitmodules' | while read i; do grep -F 'url = ' $i | gre
# There shouldn't be any code snippets under GPL or LGPL
find $ROOT_PATH/{src,base,programs} -name '*.h' -or -name '*.cpp' 2>/dev/null | xargs grep -i -F 'General Public License' && echo "There shouldn't be any code snippets under GPL or LGPL"
# Check for typos in code
CURDIR=$(dirname "${BASH_SOURCE[0]}")
"${CURDIR}"/check-typos
# Check sh tests with Shellcheck
(cd $ROOT_PATH/tests/queries/0_stateless/ && shellcheck --check-sourced --external-sources --severity info --exclude SC1071,SC2086 *.sh ../1_stateful/*.sh)

15
utils/check-style/check-typos Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Check for typos in code.
ROOT_PATH=$(git rev-parse --show-toplevel)
CURDIR=$(dirname "${BASH_SOURCE[0]}")
codespell \
--skip '*generated*,*gperf*,*.bin,*.mrk*,*.idx,checksums.txt,*.dat,*.pyc,*.kate-swp' \
--ignore-words "${CURDIR}/codespell-ignore-words.list" \
--exclude-file "${CURDIR}/codespell-ignore-lines.list" \
--quiet-level 2 \
"$ROOT_PATH"/{src,base,programs,utils} \
$@ | grep -P '.' \
&& echo -e "\nFound some typos in code.\nSee the files utils/check-style/codespell* if you want to add an exception."

View File

@ -0,0 +1,6 @@
/// https://groups.google.com/forum/#!searchin/kona-dev/variadic$20macro%7Csort:date/kona-dev/XMA-lDOqtlI/GCzdfZsD41sJ
Jo-Philipp Wich
The TRE regular expression implementation (src/regex/reg* and
src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
pullRequests(first: {min_page_size} baseRefName: "{base}" headRefName: "{head}") {{
uint64_t time_to_wait = nanoseconds * timebase_info.denom / timebase_info.numer;

View File

@ -0,0 +1,7 @@
thenn
fpr
creat
parsering
nd
ect
pullrequest