Merge pull request #3765 from asottile/require_changelog_rst
Enforce that changelog files are .rst
This commit is contained in:
		
						commit
						4705fd2bbe
					
				| 
						 | 
					@ -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)$'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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)
 | 
				
			||||||
		Loading…
	
		Reference in New Issue