diff --git a/.github/workflows/test_pre_commit.yml b/.github/workflows/test_pre_commit.yml index 99a2ddf73d..8e65864e5a 100644 --- a/.github/workflows/test_pre_commit.yml +++ b/.github/workflows/test_pre_commit.yml @@ -48,5 +48,5 @@ jobs: pre-commit install - name: Run pre-commit - run: magic run pre-commit run --all-files + run: magic run --manifest-path mojo pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b04addfbb6..59ab737652 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,9 +3,9 @@ repos: hooks: - id: mojo-format name: mojo-format - entry: mojo format mojo + entry: mojo format language: system - files: '\.(mojo|🔥|py)$' + files: '^(mojo|examples/mojo).*\.(mojo|🔥|py)$' stages: [commit] - id: check-docstrings name: check-docstrings @@ -17,7 +17,7 @@ repos: name: check-license entry: mojo mojo/stdlib/scripts/check_licenses.mojo language: system - files: '\.(mojo|🔥|py)$' + files: '^(mojo|examples/mojo).*\.(mojo|🔥|py)$' stages: [commit] - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.40.0