Skip to content

Commit

Permalink
Add codespell ignore words file to avoid the duplicated explicit list…
Browse files Browse the repository at this point in the history
… in run script

Signed-off-by: M Q <[email protected]>
  • Loading branch information
MMelQin committed Sep 27, 2024
1 parent 7766cdb commit 88b7170
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions codespell_ingore_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file contains the exact words in code that should be ignore from codespell
nd
ba
activ
Activ
dne
unexpect
hsi
donot
thirdparty
EHR
ehr

4 changes: 2 additions & 2 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ lint() {
run_command isort ${DIR_TO_RUN} || exit_code=1
# Fix python black code formatting issues, run:
run_command black ${DIR_TO_RUN} || exit_code=1
run_command codespell -w -i 3 ${DIR_TO_RUN} -L nd,ba,activ,Activ,dne,unexpect,hsi,donot,thirdparty,EHR,ehr \
run_command codespell -w -i 3 ${DIR_TO_RUN} --ignore-words codespell_ingore_words.txt \
--skip="*.onnx,*.min.js,*.min.js.map,Contrastive_learning_Notebook.ipynb,./data" || exit_code=1

# Fix cpplint with clang
Expand Down Expand Up @@ -506,7 +506,7 @@ lint() {

echo "Code spelling"
run_command codespell $DIR_TO_RUN --skip="*.onnx,*.min.js,*.min.js.map,Contrastive_learning_Notebook.ipynb,./data" \
-L nd,ba,activ,Activ,dne,unexpect,hsi,donot,thirdparty \
--ignore-words codespell_ingore_words.txt \
--exclude-file codespell.txt || exit_code=1

echo "Linting CMake"
Expand Down

0 comments on commit 88b7170

Please sign in to comment.