mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 00:54:42 +04:00
Add yaml hook.
This commit is contained in:
parent
3cfc49b522
commit
443b62d56a
3 changed files with 14 additions and 11 deletions
|
|
@ -1,20 +1,23 @@
|
||||||
- repo: git@github.com:pre-commit/pre-commit-hooks
|
- repo: git@github.com:pre-commit/pre-commit-hooks
|
||||||
sha: bec87f6c87284ea15dbcf7801810404c8036bab4
|
sha: 84fbf05803f25fea2ad4a9509b3666840bf580b4
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyflakes
|
|
||||||
files: \.py$
|
|
||||||
- id: debug-statements
|
|
||||||
files: \.py$
|
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
files: \.(py|sh|yaml)$
|
files: \.(py|sh|yaml)$
|
||||||
- id: name-tests-test
|
|
||||||
files: tests/.+\.py$
|
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
files: \.(py|sh|yaml)$
|
files: \.(py|sh|yaml)$
|
||||||
|
- id: check-yaml
|
||||||
|
files: \.(yaml|yml)$
|
||||||
|
- id: debug-statements
|
||||||
|
files: \.py$
|
||||||
|
- id: name-tests-test
|
||||||
|
files: tests/.+\.py$
|
||||||
|
- id: pyflakes
|
||||||
|
files: \.py$
|
||||||
- repo: git@github.com:pre-commit/pre-commit
|
- repo: git@github.com:pre-commit/pre-commit
|
||||||
sha: c62c1a3b513ab9e057e85a5e950bd7c438371076
|
sha: 3cfc49b522dee27cdcce83781cd874c5638ad6c1
|
||||||
hooks:
|
hooks:
|
||||||
- id: validate_manifest
|
|
||||||
files: ^hooks.yaml$
|
|
||||||
- id: validate_config
|
- id: validate_config
|
||||||
files: ^\.pre-commit-config.yaml$
|
files: ^\.pre-commit-config.yaml$
|
||||||
|
- id: validate_manifest
|
||||||
|
files: ^hooks.yaml$
|
||||||
|
exclude: ^$
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ def test_raises_for_non_existent_file(noop_validator):
|
||||||
|
|
||||||
def test_raises_for_invalid_yaml_file(noop_validator):
|
def test_raises_for_invalid_yaml_file(noop_validator):
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
noop_validator(get_resource_path('non_parseable_yaml_file.yaml'))
|
noop_validator(get_resource_path('non_parseable_yaml_file.notyaml'))
|
||||||
|
|
||||||
|
|
||||||
def test_raises_for_failing_schema(array_validator):
|
def test_raises_for_failing_schema(array_validator):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue