ClickHouse/utils/check-style/check-typos
2022-06-08 14:26:02 +02:00

15 lines
609 B
Bash
Executable File

#!/usr/bin/env bash
# Check for typos in code.
ROOT_PATH=$(git rev-parse --show-toplevel)
codespell \
--skip '*generated*,*gperf*,*.bin,*.mrk*,*.idx,checksums.txt,*.dat,*.pyc,*.kate-swp,*obfuscateQueries.cpp,aspell-ignore/' \
--ignore-words "${ROOT_PATH}/utils/check-style/codespell-ignore-words.list" \
--exclude-file "${ROOT_PATH}/utils/check-style/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."