diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 82a1e38..322b9a8 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -64,6 +64,26 @@ jobs: - name: Check style run: python3 -m ruff check . && python3 -m ruff format --check . + precommit_hooks: + runs-on: ubuntu-latest + strategy: + matrix: + hook: + - "end-of-file-fixer" + - "trailing-whitespace" + - "mixed-line-ending" + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - uses: pre-commit/action@v3.0.1 + with: + extra_args: ${{ matrix.hook.args }} --all-files + docs: runs-on: ubuntu-latest env: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4da78c8..b9a90d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,6 +10,8 @@ repos: - id: check-merge-conflict - id: detect-aws-credentials args: [ --allow-missing-credentials ] + - id: mixed-line-ending + args: [ --fix=lf ] - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.5.0 hooks: