Hello,
I understand that pre-commit will cd at the root of the repo before executing the pre-commit config. When executing from a subfolder, it will create issues because it takes the subfolder pre-commit and then executes it at the root level.
To avoid this issue, is it possible for this hook to retrieve the sub-pre-commit by specifying another filename?
For example,
repos:
- repo: https://github.com/ddanier/sub-pre-commit.git
rev: v4.2.0
hooks:
- id: sub-pre-commit
...
args: ["-p", "my_sub_project", "--pre-commit-filename", ".sub-pre-commit-config.yaml"]
So that when executing pre-commit run -a from the subfolder, it won't detect any ".pre-commit-config.yaml" and will take the main one at the rool level.
Hello,
I understand that pre-commit will
cdat the root of the repo before executing the pre-commit config. When executing from a subfolder, it will create issues because it takes the subfolder pre-commit and then executes it at the root level.To avoid this issue, is it possible for this hook to retrieve the sub-pre-commit by specifying another filename?
For example,
So that when executing
pre-commit run -afrom the subfolder, it won't detect any ".pre-commit-config.yaml" and will take the main one at the rool level.