-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Hi,
When using the args field to pass command-line arguments in the pre-commit hook configuration for conventional-pre-commit, the arguments are not being parsed correctly. For example, the configuration:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [--verbose, --force-scope, --scopes api]
fails to correctly interpret the arguments. However, directly specifying the CLI command via the entry field works as intended:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
entry: conventional-pre-commit --verbose --force-scope --scopes api .git/COMMIT_EDITMSG
This was true for the commit message:
fix(foobar): test commit rejected as expected only when specifying the CLI command via the entry field.
I believe the root cause is how the args are being handled. I don't think there are any tests that cover usage of the args field, and instead existing tests call the module directly.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed