2020-08-08 01:39:08 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Check for typos in code.
|
|
|
|
|
|
|
|
ROOT_PATH=$(git rev-parse --show-toplevel)
|
|
|
|
|
2023-12-18 08:07:22 +00:00
|
|
|
#FIXME: check all (or almost all) repo
|
2020-08-08 01:39:08 +00:00
|
|
|
codespell \
|
2022-09-02 08:54:48 +00:00
|
|
|
--skip "*generated*,*gperf*,*.bin,*.mrk*,*.idx,checksums.txt,*.dat,*.pyc,*.kate-swp,*obfuscateQueries.cpp,d3-*.js,*.min.js,*.sum,${ROOT_PATH}/utils/check-style/aspell-ignore" \
|
2020-12-24 10:11:07 +00:00
|
|
|
--ignore-words "${ROOT_PATH}/utils/check-style/codespell-ignore-words.list" \
|
|
|
|
--exclude-file "${ROOT_PATH}/utils/check-style/codespell-ignore-lines.list" \
|
2020-08-08 01:39:08 +00:00
|
|
|
--quiet-level 2 \
|
2023-02-09 10:05:14 +00:00
|
|
|
"$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."
|