Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

pre-commit config not working me, what am i missing? Thanks #838

Unanswered
mannp asked this question in Q&A
pre-commit config not working me, what am i missing? Thanks #838
Nov 18, 2022 * 1 comment
Return to top
Discussion options

mannp
Nov 18, 2022

- repo: https://github.com/datreeio/datree
rev: 1.8.0
hooks:
- id: datree-docker
name: datree test, run within docker
description: Prevent Kubernetes misconfigurations from reaching production
types: [file, yaml]
language: docker_image
pass_filenames: true
args: [test, --ignore-missing-schemas, --only-k8s-files, --schema-version 1.24.6]
entry: --user root datree/datree:latest

This results in the following error;

git commit -m "--wip--"
yamllint....................................................................Passed
trim trailing whitespace....................................................Passed
fix end of files............................................................Passed
mixed line ending...........................................................Passed
CRLF end-lines remover......................................................Passed
Tabs remover................................................................Passed
Fix smartquote characters...................................................Passed
Check for unencrypted Kubernetes secrets in manifests.......................Passed
Detect hardcoded secrets....................................................Passed
datree test, run within docker..............................................Failed
- hook id: datree-docker
- exit code: 1

Error: unknown flag: --schema-version 1.24.6

I've tried various permutations and combinations of quotes around the flags, but none of them work, the same error results.

Can someone point me to my error please :)

You must be logged in to vote

Replies: 1 comment

Comment options

hadar-co
Nov 20, 2022

Hi @mannp, I think the value might need to be passed like another argument:
args: [test, --ignore-missing-schemas, --only-k8s-files, --schema-version, 1.24.6]

Have you tried that?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants