diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49dc049e..051fdb8f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,15 @@ repos: - id: mypy exclude: tests/ - repo: https://github.com/PrincetonUniversity/blocklint - rev: v0.2.4 + rev: v0.2.5 hooks: - id: blocklint exclude: 'docs/Makefile|docs/release_notes.rst|tox.ini' +- repo: local + hooks: + - id: check-rst-files + name: Check for .rst files in the top-level directory + entry: sh -c 'ls *.rst 1>/dev/null 2>&1 && { echo "found .rst file in top-level folder"; exit 1; } || exit 0' + language: system + always_run: true + pass_filenames: false