Uh oh!
There was an error while loading. Please reload this page.
Store and return last failure from validate vs exit on first failure - #45
Conversation
brikis98
left a comment
There was a problem hiding this comment.
Thanks for the PR! How did you test this?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
davidalger
commented
Dec 8, 2020
Here's what I did to test this: a) Added the following to Can also be done via HEAD referencing local checkout: b) Run pre-commit on all files with intentionally bad code: Failed as expected with errors found in one of the validations. c) Attempt to commit the bad code: Failed as expected. d) Commit some passing changes to verify it passes: e) Run pre-commit on all files again expecting no failures: |
brikis98
left a comment
There was a problem hiding this comment.
Fantastic, thank you! I'll kick off the tests now.
brikis98
commented
Dec 9, 2020
Tests passed! Merging now. |
This PR updates the `terraform-fmt` hook as follows: 1. Extract all the directories with Terraform code first and run `terraform fmt` once per directory. 1. Print out the directory where we're running `terraform fmt` to make debugging errors much easier. 1. Instead of exiting on the first error, save the exit codes, and print out all `fmt` errors before exiting. These changes are very similar to #45.
brikis98
commented
Dec 9, 2020
Ah, I just realized we should apply similar changes to the |
This PR updates the `terraform-fmt` hook as follows: 1. Run with `-diff -check` so the differences are printed, rather than made on disk. 1. Instead of exiting on the first error, save the exit codes, and print out all `fmt` errors before exiting. These changes are very similar to #45.
…pre-commit-mirrors-license Add LICENSE from pre-commit-mirror-maker
This PR accomplishes two things: