diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aacc675d5c..a6857629e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,15 @@ jobs: uses: actions/checkout@v6 - name: Trailing whitespaces check run: make check-trailing-tabs + check-mixed-indentation: + name: Check mixed indentation + runs-on: ubuntu-latest + container: python:3.11 + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Mixed indentation check + run: make check-mixed-indentation check-hyperlinks: name: Check hyperlinks runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index e36372ecca..faad14ec10 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,12 @@ check-trailing-tabs: rc=$$? ; \ if [ "$$rc" = 1 ]; then exit 0; elif [ "$$rc" = 0 ]; then exit 1; else exit "$$rc"; fi +.PHONY: check-mixed-indentation +check-mixed-indentation: + grep -RIn --include='*.rst' -P '^(?:\t|\s+\t)' source/ ; \ + rc=$$? ; \ + if [ "$$rc" = 1 ]; then exit 0; elif [ "$$rc" = 0 ]; then exit 1; else exit "$$rc"; fi + .PHONY: check-hyperlinks check-hyperlinks: venv docs venv/bin/linkchecker -f linkcheckerrc dist/en/index.html