Skip to content

tflint hook - please support home directory #165

Closed
@m00lecule

Description

@m00lecule

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions