Skip to content

Commit 0e03c38

Browse files
Fixing tf_lint stage of hk (#3504)
- Without specifying the configuration file it does not apply correct fixes - Pathing is relative to directory hk is running in, therefore with --recursive we must pass absolute paths
2 parents 0a3024a + 712be19 commit 0e03c38

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- run: yarn install --immutable --immutable-cache --check-cache
2424
- uses: hashicorp/setup-terraform@v3
2525
- uses: terraform-linters/setup-tflint@v4
26+
- run: tflint --chdir=terraform --init
2627
- uses: jdx/mise-action@v2
2728
with:
2829
install_args: hk pkl

hk.pkl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ local linters = new Mapping<String, Group> {
3232

3333
["tf_lint"] = new Step {
3434
glob = "*.tf"
35-
check = "tflint --chdir=terraform --recursive"
36-
fix = "tflint --chdir=terraform --recursive --fix"
35+
check = "tflint --chdir=terraform --config=$(pwd)/terraform/.tflint.hcl --recursive"
36+
fix = "tflint --chdir=terraform --config=$(pwd)/terraform/.tflint.hcl --recursive --fix"
3737
}
3838
}
3939
}

0 commit comments

Comments
 (0)