ClickHouse/utils/check-style/check-typos
Alexey Milovidov 6c4df0f27a Better tool
2020-08-08 17:10:49 +03:00

16 lines
568 B
Bash
Executable File

#!/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."