Repository navigation
Arguments not passed in pre-commit setup #1873
|
In the following setup of repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.26.0
hooks:
- id: gitleaks
- args: [--config=.gitleaks.toml]I get the following warning / error What is the correct way to format the entry |
Replies: 1 comment
|
The repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.26.0
hooks:
- id: gitleaks
args: [--config=.gitleaks.toml]Your version parses as two separate hook entries — Also worth knowing: if |
The
argsline is a separate list item instead of being nested under theid: gitleakshook, which is why pre-commit sees it as its own hook entry missing a requiredid. Each-underhooks:is one hook config, soargsneeds to be indented under the same entry asid: gitleaks, not as a sibling:Your version parses as two separate hook entries —
{id: gitleaks}and{args: [...]}— and the second one fails validation because it has noid.Also worth knowing: if
.gitleaks.tomlsits at the root of the repo being scanned, you don't actually need--configat…