Skip to content

Commit

Permalink
fix: add **/*.patch.yaml as the suggested exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
donbowman committed Apr 11, 2020
1 parent 5a07280 commit 4dc3959
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ k8s-validate [--kubernetes-version X.X.X] [--exclude glob-pattern] files

Add a section similar to this to your .pre-commit-hooks.yaml:
- repo: https://github.com/Agilicus/pre-commit-hook-k8svalidate.git
rev: v0.0.5
rev: v0.0.6
hooks:
- id: k8svalidate
args: [--exclude, "*.patch.yaml"]
args: [--exclude, "**/*.patch.yaml"]
files: .yaml$
2 changes: 1 addition & 1 deletion pre-commit-hooks/k8svalidate
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def main():
except utils.SchemaNotFoundError:
result = "Skipped [Unknown Schema]"
except jsonschema.exceptions.ValidationError as e:
result = f"FAIL [{str(e)}]"
result = f"FAIL [{e.args[0]}]"
valid = False
else:
result = "Skipped [Not Kubernetes YAML]"
Expand Down

0 comments on commit 4dc3959

Please sign in to comment.