Merge pull request #3512 from asottile/rst_via_pre_commit
Call rst-lint directly with pre-commit
This commit is contained in:
commit
ee6c54904b
|
@ -23,7 +23,8 @@ repos:
|
|||
hooks:
|
||||
- id: rst
|
||||
name: rst
|
||||
entry: python scripts/check-rst.py
|
||||
entry: rst-lint --encoding utf-8
|
||||
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|changelog/.*)$
|
||||
language: python
|
||||
additional_dependencies: [pygments, restructuredtext_lint]
|
||||
python_version: python3.6
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess
|
||||
import glob
|
||||
import sys
|
||||
|
||||
sys.exit(
|
||||
subprocess.call(
|
||||
[
|
||||
"rst-lint",
|
||||
"--encoding",
|
||||
"utf-8",
|
||||
"CHANGELOG.rst",
|
||||
"HOWTORELEASE.rst",
|
||||
"README.rst",
|
||||
]
|
||||
+ glob.glob("changelog/[0-9]*.*")
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue