CI: add codespell

Reviewed-by: Luca Weiss <luca@z3ntu.xyz>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230706211537.10438-3-ollieparanoid@postmarketos.org%3E
This commit is contained in:
Oliver Smith 2023-07-06 23:14:45 +02:00
parent 67fe5a62fd
commit c734b2c523
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
2 changed files with 23 additions and 0 deletions

View File

@ -15,6 +15,9 @@ tasks:
- vermin: |
cd pmbootstrap
sudo .ci/vermin.sh
- codespell: |
cd pmbootstrap
sudo .ci/codespell.sh
- pytest: |
cd pmbootstrap
sudo .ci/pytest.sh

20
.ci/codespell.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh -ex
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright 2023 Oliver Smith
# Description: find typos
# https://postmarketos.org/pmb-ci
if [ "$(id -u)" = 0 ]; then
set -x
apk -q add \
py3-codespell
exec su "${TESTUSER:-build}" -c "sh -e $0"
fi
set -x
# -L: words to ignore
codespell \
-L crate \
-L hda \
.