ClickHouse/utils/check-style/check-typos

15 lines
656 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
# Check for typos in code.
ROOT_PATH=$(git rev-parse --show-toplevel)
codespell \
2022-06-16 09:38:54 +00:00
--skip "*generated*,*gperf*,*.bin,*.mrk*,*.idx,checksums.txt,*.dat,*.pyc,*.kate-swp,*obfuscateQueries.cpp,d3-*.js,*.min.js,${ROOT_PATH}/utils/check-style/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} \
2020-08-08 01:52:28 +00:00
$@ | grep -P '.' \
&& echo -e "\nFound some typos in code.\nSee the files utils/check-style/codespell* if you want to add an exception."