cachix / git-hooks.nix

Seamless integration of https://pre-commit.com git hooks with Nix.
Apache License 2.0
533 stars 155 forks source link

Run `tflint` on all args #475

Open lbodor opened 4 months ago

lbodor commented 4 months ago

Would it be better to use entry instead of a wrapper?

Sample output

terraform-lint...........................................................Failed
- hook id: terraform-lint
- exit code: 1

components/aws-js-s3-explorer/main.tf 1 issue(s) found:

Warning: Missing version constraint for provider "aws" in `required_providers` (terraform_required_providers)

  on components/aws-js-s3-explorer/main.tf line 6:
   6: resource "aws_s3_object" "index_html" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

components/gnss-eks/modules/argo-workflows/argo-workflows.tf 4 issue(s) found:

Warning: Missing version constraint for provider "template" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 9:
   9: data "template_file" "server_config" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

Warning: Missing version constraint for provider "random" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 70:
  70: resource "random_password" "db_user" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

Warning: Missing version constraint for provider "aws" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 91:
  91: resource "aws_s3_bucket" "artifact_repository" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

Warning: Missing version constraint for provider "kubernetes" in `required_providers` (terraform_required_providers)

  on components/gnss-eks/modules/argo-workflows/argo-workflows.tf line 129:
 129: resource "kubernetes_secret" "artifact_repository_user_creds" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.7.0/docs/rules/terraform_required_providers.md

[INFO] Restored changes from /home/lbodor/.cache/pre-commit/patch1721082677-427193.