Enforce that changelog files are .rst

This commit is contained in:
Anthony Sottile 2018-08-01 15:21:34 -07:00
parent f25683354e
commit a80e031c62
3 changed files with 12 additions and 0 deletions

View File

@ -38,3 +38,8 @@ repos:
language: python language: python
additional_dependencies: [pygments, restructuredtext_lint] additional_dependencies: [pygments, restructuredtext_lint]
python_version: python3.6 python_version: python3.6
- id: changelogs-rst
name: changelog files must end in .rst
entry: ./scripts/fail
language: script
files: 'changelog/.*(?<!\.rst)$'

7
scripts/fail Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env python
"""Used by .pre-commit-config.yaml"""
import sys
if __name__ == "__main__":
print(" ".join(sys.argv[1:]))
sys.exit(1)