mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-03-29 10:16:52 +00:00
Add a hook for yaml files.
This commit is contained in:
parent
212b3dc49d
commit
3e45f53e68
8 changed files with 59 additions and 3 deletions
0
testing/__init__.py
Normal file
0
testing/__init__.py
Normal file
2
testing/resources/bad_yaml.notyaml
Normal file
2
testing/resources/bad_yaml.notyaml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# It's surprisingly hard to make invalid yaml
|
||||
a: "
|
||||
1
testing/resources/ok_yaml.yaml
Normal file
1
testing/resources/ok_yaml.yaml
Normal file
|
|
@ -0,0 +1 @@
|
|||
im: ok yaml
|
||||
9
testing/util.py
Normal file
9
testing/util.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
import os.path
|
||||
|
||||
|
||||
TESTING_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
def get_resource_path(path):
|
||||
return os.path.join(TESTING_DIR, 'resources', path)
|
||||
Loading…
Add table
Add a link
Reference in a new issue