File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,11 @@ repos:
3333 - id : no-markdown-in-docs-source
3434 name : Prevent markdown files in docs/source directories
3535 entry : bash -c
36- args : ['if find . -path "*/docs/source/*.md" -not -path "./docs/README.md" | grep -q .; then echo "ERROR: Markdown files found in docs/source/ directories. Use reST (.rst) instead."; exit 1; fi']
36+ args :
37+ - ' for file in "$@"; do >&2 echo "error: markdown file "$file" found in a docs/source directory. Only reST (.rst) is allowed"; done && exit 1'
38+ - " _" # fake script name, because bash considers $0 (the first argument) to be the script name
3739 language : system
38- pass_filenames : false
39- always_run : true
40+ files : ' ^.*/docs/source/.*\.md$'
4041
4142 # Standard hooks
4243 - repo : https://github.com/pre-commit/pre-commit-hooks
You can’t perform that action at this time.
0 commit comments