tools/ci.sh: Add functions to check code spelling using codespell.

Signed-off-by: Damien George <damien@micropython.org>

tools/ci.sh: Explicitly specify pyproject.toml.

Signed-off-by: Damien George <damien@micropython.org>

tools/ci.sh: Import tomli.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-03-08 13:15:25 +11:00
parent 07a719a315
commit d77c35f110
2 changed files with 32 additions and 0 deletions

21
pyproject.toml Normal file
View File

@ -0,0 +1,21 @@
[tool.codespell]
count = ""
ignore-regex = '\b[A-Z]{3}\b'
ignore-words-list = "ans,asend,deques,dout,extint,hsi,iput,numer,technic,ure"
quiet-level = 3
skip = """
*/build*,\
./.git,\
./drivers/cc3100,\
./lib,\
./ports/cc3200/FreeRTOS,\
./ports/cc3200/bootmgr/sl,\
./ports/cc3200/hal,\
./ports/cc3200/simplelink,\
./ports/cc3200/telnet,\
./ports/nrf/drivers/bluetooth/s1*,\
./ports/renesas-ra,\
./ports/stm32/usbhost,\
./tests,\
ACKNOWLEDGEMENTS,\
"""

View File

@ -28,6 +28,17 @@ function ci_code_formatting_run {
tools/codeformat.py -v
}
########################################################################################
# code spelling
function ci_code_spell_setup {
pip3 install codespell tomli
}
function ci_code_spell_run {
codespell
}
########################################################################################
# commit formatting