Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TFSec Outputs The Same Results Multiple Times #196

Closed
sharkymcdongles opened this issue Apr 26, 2021 · 2 comments · Fixed by #237
Closed

TFSec Outputs The Same Results Multiple Times #196

sharkymcdongles opened this issue Apr 26, 2021 · 2 comments · Fixed by #237
Assignees
Labels
bug Something isn't working estimate/2h Need 2 hours to be done hook/terraform_tfsec Bash hook

Comments

@sharkymcdongles
Copy link

sharkymcdongles commented Apr 26, 2021

When I add tfsec as a hook it outputs the same results 2x for some reason, and I can't seem to figure out why. Anyone else experiencing this? I am using latest tfsec and the latest release hash from this repo. My configuration file is:

---
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
  rev: fa3859e
  hooks:
  - id: terraform_fmt
  - id: terraform_validate
  - id: terraform_tflint
  - id: terraform_tfsec
  - id: terraform_docs_replace

I am also using the latest precommit.

@MaxymVlasov MaxymVlasov added estimate/2h Need 2 hours to be done hook/terraform_tfsec Bash hook bug Something isn't working documentation Improvements or additions to documentation labels Sep 9, 2021
@MaxymVlasov
Copy link
Collaborator

MaxymVlasov commented Sep 9, 2021

Can be fixed by adding require_serial: true in the https://github.com/antonbabenko/pre-commit-terraform/blob/master/.pre-commit-hooks.yaml.

But firstly, need to run a speed test with and without require_serial option. Need to check that it does not dramatically increase hook execution time.

Also, need to document how pre-commit options work for hooks, to simplify future contributing

@MaxymVlasov MaxymVlasov added estimate/1day Need 1 work day to be done and removed estimate/2h Need 2 hours to be done labels Sep 9, 2021
@MaxymVlasov MaxymVlasov added this to the Bug and docs fixes milestone Sep 9, 2021
@MaxymVlasov MaxymVlasov self-assigned this Oct 1, 2021
@MaxymVlasov MaxymVlasov added estimate/2h Need 2 hours to be done and removed estimate/1day Need 1 work day to be done labels Oct 1, 2021
@MaxymVlasov
Copy link
Collaborator

MaxymVlasov commented Oct 6, 2021

Also, need to document how pre-commit options work for hooks, to simplify future contributing

Moved to #216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working estimate/2h Need 2 hours to be done hook/terraform_tfsec Bash hook
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants