From d950ee737644e679ad9f137df564a702dfcb3e8c Mon Sep 17 00:00:00 2001 From: pacrob <5199899+pacrob@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:06:08 -0600 Subject: [PATCH] add lint check for .rst files incorrectly placed in the top-level dir, also bump blocklint version --- .pre-commit-config.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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