Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit: set pass_filenames to true #260

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
pre-commit: set pass_filenames to true
#258 added pre-commit support to Yamale, with `pass_filenames: false`, as only one path is supported at a time.

#251 added support for multiple paths.

Therefore now it is possible to use `pass_filenames: true` with pre-commit.

Sample run (filenames redacted):

```
% pre-commit run --all-files yamale-schema-verify --verbose
check yaml schema with Yamale............................................Passed
- hook id: yamale-schema-verify
- duration: 0.12s

Validating file1.yaml...
Validating file2.yaml...
Validating file3.yaml...
Validating file4.yaml...
Validation success! 👍
[...]
```
thiagowfx authored Dec 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 64d08fd206ce44a2d722bc3f3db2a211c1fbfe05
4 changes: 2 additions & 2 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- id: yamale-schema-verify
name: check yaml schema with Yamale
description: prevents invalid yaml schemas from being committed.
description: prevents invalid yaml schemas from being committed
entry: yamale
language: python
types: [yaml]
pass_filenames: false
pass_filenames: true
stages: [pre-commit, pre-push, manual]