diff --git a/.build.yml b/.build.yml index 5914c34e..292dcf99 100644 --- a/.build.yml +++ b/.build.yml @@ -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 diff --git a/.ci/codespell.sh b/.ci/codespell.sh new file mode 100755 index 00000000..5dff389a --- /dev/null +++ b/.ci/codespell.sh @@ -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 \ + .