gruntwork-io / pre-commit

A collection of pre-commit hooks used by Gruntwork tools
https://gruntwork.io/
Apache License 2.0
484 stars 155 forks source link

Add support to use args in tflint #92

Closed msgongora closed 1 year ago

msgongora commented 1 year ago

Description

While I was trying to disable some rules for tflint at specific locations I realized that I needed to use args because having a .tflint.hcl wasn't an option for my project structure. Here is the support for args.

$ tflint -v
TFLint version 0.44.1
+ ruleset.terraform (0.2.2-bundled)

$ tf version
Terraform v1.3.8
  - id: tflint
    name: Terraform lint (gcp project level)
    files: ^gcp/[\w_\-]+/[\w_\-]+\.tf$
    args: [--disable-rule=terraform_required_providers]

Documentation

TODOs

Please ensure all of these TODOs are completed before asking for a review.

Related Issues

Not my initial issue but #90 should be fixed with this code.

gcagle3 commented 1 year ago

@msgongora It looks like the build is failing because your fork is missing some updated pipeline changes from commit 5341f388c2a962d3bc66e075f00b80ab45b15f24. Could you rebase and pull in the latest changes into your fork? That should resolve the build failure and allow this to proceed.

msgongora commented 1 year ago

@msgongora It looks like the build is failing because your fork is missing some updated pipeline changes from commit 5341f38. Could you rebase and pull in the latest changes into your fork? That should resolve the build failure and allow this to proceed.