mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
added config validation to install tests
This commit is contained in:
parent
905b99917f
commit
95d9e29996
2 changed files with 25 additions and 17 deletions
|
|
@ -41,7 +41,7 @@ CONFIG_JSON_SCHEMA = {
|
|||
}
|
||||
|
||||
|
||||
validate_manifest = get_validator(
|
||||
validate_config = get_validator(
|
||||
C.CONFIG_FILE,
|
||||
CONFIG_JSON_SCHEMA,
|
||||
InvalidConfigError,
|
||||
|
|
@ -60,7 +60,7 @@ def run(argv):
|
|||
args = parser.parse_args(argv)
|
||||
|
||||
try:
|
||||
validate_manifest(args.filename)
|
||||
validate_config(args.filename)
|
||||
except InvalidConfigError as e:
|
||||
print(e.args[0])
|
||||
# If we have more than one exception argument print the stringified
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue