1

We have specified some 'args' in the pre-commit-hooks.yaml file.

If now 'args' are also specified in the pre-commit-config.yaml are these added to the default ones or are these overwriting the default ones?

From the official documentation it is not clear to me what happens!

Thank you

Marko
  • 929
  • 9
  • 27

1 Answers1

3

yes, they overwrite receiving their defaults from .pre-commit-hooks.yaml

from the docs

All optional keys will receive their default from the repository's configuration.

if you want to specify arguments that are ~always honored, specify them in entry such as entry: autopep8 -i (this can still be overridden by the consuming repository, though it is less likely)

anthony sottile
  • 61,815
  • 15
  • 148
  • 207