作者:0523wei | 来源:互联网 | 2023-09-13 17:37
I'm configuring precommit for a repo inside my organization. Suppose the output of one of the hooks, or its usefulness, or how to fix it, might be not that obvious to my coworkers.
I would like to be able to configure a custom message when this hook fails - e.g. it could point to an organization-internal wiki page explaining why we have enabled this hook and how to fix common issues with it.
It could look something like this I suppose:
1 2 3 4 5 6
| - repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
# "message" would be a new field for a hook
message: "Please see http://notion.so/my-org/Python-Autoformatting for configuration and common issues" |
该提问来源于开源项目:pre-commit/pre-commit
you can also override
to put the messaging directly into the supported path:
1 2 3
| yaml
- id: black
name: black - see https://..watever |