Closed
Description
Hello! Currently I am trying to figure out how to share one .pre-commit-config.yml
among lots of repositories.
I have tried downloading it to home directory and then referencing it using ~
. Unfortunately this approach is not working - following config:
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.44.0
hooks:
- id: terraform_fmt
- id: terraform_docs
- id: terraform_tflint
args:
- '--args=--config=~/.linters/.tflint.hcl'
raises this exception:
$ git commit -m "test"
Terraform fmt............................................................Passed
Terraform docs...........................................................Passed
Terraform validate with tflint...........................................Failed
- hook id: terraform_tflint
- exit code: 2
Failed to load TFLint config. An error occurred:
Error: `~/.linters/.tflint.hcl` is not found
Check for merge conflicts................................................Passed**
For future reference this repo should be used by any user, then replacing ~
with the path /home/michal
is not acceptable. I would be pleased if this feature will be added in upcoming releases.