pre-commit-config.yaml 中的参数是否覆盖 pre-commit-hooks.yaml 中的参数?
Are args in pre-commit-config.yaml overwriting args in pre-commit-hooks.yaml?
我们在预提交-hooks.yaml 文件中指定了一些 'args'。
如果现在 'args' 也在预提交中指定-config.yaml 这些是添加到默认的还是覆盖默认的?
根据官方文档,我不清楚发生了什么!
谢谢
是的,他们覆盖了从 .pre-commit-hooks.yaml
接收的默认值
来自 the docs
All optional keys will receive their default from the repository's configuration.
如果你想指定总是被尊重的参数,在 entry
中指定它们,例如 entry: autopep8 -i
(这仍然可以被消费存储库覆盖,尽管这种可能性较小)
我们在预提交-hooks.yaml 文件中指定了一些 'args'。
如果现在 'args' 也在预提交中指定-config.yaml 这些是添加到默认的还是覆盖默认的?
根据官方文档,我不清楚发生了什么!
谢谢
是的,他们覆盖了从 .pre-commit-hooks.yaml
来自 the docs
All optional keys will receive their default from the repository's configuration.
如果你想指定总是被尊重的参数,在 entry
中指定它们,例如 entry: autopep8 -i
(这仍然可以被消费存储库覆盖,尽管这种可能性较小)