From: Zbigniew Jędrzejewski-Szmek Date: Fri, 3 Sep 2021 11:41:33 +0000 (+0200) Subject: ci: add a check for tabs X-Git-Tag: v11~66^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F783%2Fhead;p=thirdparty%2Fmkosi.git ci: add a check for tabs Surprisingly, none of the standard tools complain about tabs in the code, at least in some locations. I expected that python3 would always complain, or at least tabnanny, or pyflakes… Let's roll a simple custom check. Use '-P' to request perl-compatible regular expressions even the user has a different default configures so that '\t' works as expected. --- diff --git a/.github/workflows/ci-unit-test.yml b/.github/workflows/ci-unit-test.yml index 798d3e600..5eaa72713 100644 --- a/.github/workflows/ci-unit-test.yml +++ b/.github/workflows/ci-unit-test.yml @@ -25,6 +25,9 @@ jobs: - name: Run pyflakes run: python3 -m pyflakes mkosi/ tests/ + - name: Check that tabs are not used in code + run: sh -c '! git grep -P "\\t" "*.py"' + - name: Type Checking (mypy) run: python3 -m mypy --python-version 3.7 mkosi