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