Skip to content

Commit

Permalink
Scan only one directory to improve performance with terrascan
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosbustillordguez committed Dec 22, 2021
1 parent 0d1c716 commit 677912b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terrascan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ terrascan_() {

# consume modified files passed from pre-commit so that
# terrascan runs against only those relevant directories
for file_with_path in "${files[@]}"; do
# shellcheck disable=SC2128 # scan the first directory of the FILES array
for file_with_path in $files; do
file_with_path="${file_with_path// /__REPLACED__SPACE__}"
paths[index]=$(dirname "$file_with_path")
index=$((index + 1))
Expand Down

0 comments on commit 677912b

Please sign in to comment.