Skip to content

Commit

Permalink
chore(CI): fix custom tflint path (#2503)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Aug 9, 2024
1 parent e52c99b commit 9792271
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ function check_tflint() {
# load default ruleset
tflintCfg="/root/tflint/.tflint.example.hcl"
# load if local repo ruleset
if [[ -f "./github/.tflint.repo.hcl" ]]; then
tflintCfg="./github/.tflint.repo.hcl"
if [[ -f "/workspace/.github/.tflint.repo.hcl" ]]; then
tflintCfg="/workspace/.github/.tflint.repo.hcl"
# if module, load tighter ruleset
elif [[ $path == "." || $path == "./modules"* || $path =~ "^[0-9]+-.*" ]]; then
tflintCfg="/root/tflint/.tflint.module.hcl"
fi

cd "${path}" && echo "Working in ${path} ..."
cd "${path}" && echo "Working in ${path} using ${tflintCfg}..."
tflint --config=${tflintCfg} --no-color
rc=$?
if [[ "${rc}" -ne 0 ]]; then
Expand Down

0 comments on commit 9792271

Please sign in to comment.