mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Make hooks specify files. Optionally allow config to override manifest.
This commit is contained in:
parent
0ec9020346
commit
96174deac6
25 changed files with 81 additions and 50 deletions
|
|
@ -2,19 +2,12 @@
|
|||
sha: bec87f6c87284ea15dbcf7801810404c8036bab4
|
||||
hooks:
|
||||
- id: pyflakes
|
||||
files: \.py$
|
||||
- id: debug-statements
|
||||
files: \.py$
|
||||
- id: trailing-whitespace
|
||||
files: \.(py|sh|yaml)$
|
||||
- id: name-tests-test
|
||||
files: tests/.+\.py$
|
||||
- id: end-of-file-fixer
|
||||
files: \.(py|sh|yaml)$
|
||||
- repo: git@github.com:pre-commit/pre-commit
|
||||
sha: c62c1a3b513ab9e057e85a5e950bd7c438371076
|
||||
hooks:
|
||||
- id: validate_manifest
|
||||
files: ^hooks.yaml$
|
||||
- id: validate_config
|
||||
files: ^\.pre-commit-config.yaml$
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: Failing hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: .
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: Bar
|
||||
entry: bar
|
||||
language: python
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@
|
|||
entry: node-11-8-hook
|
||||
language: node
|
||||
language_version: 0.11.8
|
||||
files: \.js$
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: Foo
|
||||
entry: foo
|
||||
language: node
|
||||
files: \.js$
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: Prints Cwd
|
||||
entry: pwd
|
||||
language: system
|
||||
files: \.sh$
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@
|
|||
entry: python3-hook
|
||||
language: python
|
||||
language_version: python3.3
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: Foo
|
||||
entry: foo
|
||||
language: python
|
||||
files: \.py$
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@
|
|||
entry: ruby_hook
|
||||
language: ruby
|
||||
language_version: 1.9.3-p547
|
||||
files: \.rb$
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: Ruby Hook
|
||||
entry: ruby_hook
|
||||
language: ruby
|
||||
files: \.rb$
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: Bash hook
|
||||
entry: bin/hook.sh
|
||||
language: script
|
||||
files: ''
|
||||
|
|
|
|||
|
|
@ -2,3 +2,4 @@
|
|||
name: System hook with spaces
|
||||
entry: /usr/bin/python -c 'import sys; print("Hello World")'
|
||||
language: system
|
||||
files: \.sh$
|
||||
|
|
|
|||
|
|
@ -3,4 +3,3 @@
|
|||
- id: pyflakes
|
||||
- id: jslint
|
||||
- id: trim_trailing_whitespace
|
||||
files: '*.py'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue