Skip to content

Commit

Permalink
Merge pull request #2 from mineiros-io/hooks-should-be-executable-per…
Browse files Browse the repository at this point in the history
…-default

Hooks should be executable per default
  • Loading branch information
soerenmartius authored Jan 7, 2020
2 parents 915ee4a + 3a9822d commit 8c274aa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- id: tflint
name: tflint
description: TFLint is a Terraform linter focused on possible errors, best practices, etc. (Terraform >= 0.12)
entry: hooks/tflint.sh
entry: pre_commit_hooks/tflint.sh
language: script
files: \.tf$
exclude: \.+.terraform\/.*$
9 changes: 9 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ pre-commit run terraform-validate --all-files

pre-commit run --all-files
```

=== Contribute

All `*.sh` files inside pre_commit_hooks need to be marked as executable. Otherwise the pre-commot hooks won't be executable
by default. You apply the flag to all `*.sh` files with the following command:

```
find pre_commit_hooks/ -type f -iname "*.sh" -exec chmod +x {} \;
```
Empty file modified pre_commit_hooks/terraform/fmt.sh
100644 → 100755
Empty file.
Empty file modified pre_commit_hooks/terraform/tflint.sh
100644 → 100755
Empty file.
Empty file modified pre_commit_hooks/terraform/validate.sh
100644 → 100755
Empty file.

0 comments on commit 8c274aa

Please sign in to comment.