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>
pull/10911/head
Damien George 2023-03-08 13:15:25 +11:00
rodzic 07a719a315
commit d77c35f110
2 zmienionych plików z 32 dodań i 0 usunięć

21
pyproject.toml 100644
Wyświetl plik

@ -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,\
"""

Wyświetl plik

@ -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