Skip to content

Commit

Permalink
Add support to use args in tflint
Browse files Browse the repository at this point in the history
  • Loading branch information
msgongora committed Apr 20, 2023
1 parent 5341f38 commit 0c49be9
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions hooks/tflint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ export PATH=$PATH:/usr/local/bin
# Install any plugins defined in .tflint.hcl
tflint --init

for file in "$@"; do
tflint $file

declare -a FILES
declare -a ARGS
while [[ $# -gt 0 ]]
do
case "$1" in
-*) ARGS+=("$1")
;;
*) FILES+=("$1")
;;
esac
shift
done

for file in "${FILES[@]}"
do
tflint "${ARGS[@]}" "$file"
done

0 comments on commit 0c49be9

Please sign in to comment.