2
0

check-rst.sh 269 B

12345678910
  1. #!/usr/bin/env bash
  2. set -uo pipefail
  3. output=$(grep -r -P '^(?!\s*\.\.).*\S::$' --include='*.rst' --exclude='docs_writing_guidelines.rst' .)
  4. if [[ -n $output ]]; then
  5. echo 'The shorthand codeblock syntax (trailing `::`) is not allowed.'
  6. echo "$output"
  7. exit 1
  8. fi