From c734b2c52323db60191b3211c644e9cb60ad4161 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 6 Jul 2023 23:14:45 +0200 Subject: [PATCH] CI: add codespell Reviewed-by: Luca Weiss Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230706211537.10438-3-ollieparanoid@postmarketos.org%3E --- .build.yml | 3 +++ .ci/codespell.sh | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 .ci/codespell.sh 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 \ + .