check_yaml should not require any arguments.
This commit is contained in:
parent
f78ea7200d
commit
63b595ec2c
|
@ -9,7 +9,7 @@ from pre_commit_hooks.util import entry
|
|||
@entry
|
||||
def check_yaml(argv):
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('filenames', nargs='+', help='Filenames to check.')
|
||||
parser.add_argument('filenames', nargs='*', help='Filenames to check.')
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
retval = 0
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
import subprocess
|
||||
|
||||
from pre_commit.clientlib.validate_manifest import load_manifest
|
||||
|
||||
|
||||
def test_all_hooks_allow_no_files():
|
||||
manifest = load_manifest('hooks.yaml')
|
||||
|
||||
for hook in manifest:
|
||||
if hook['id'] != 'pyflakes':
|
||||
subprocess.check_call([hook['entry']])
|
Loading…
Reference in New Issue