Skip to main content

Linters

tfaction runs some linters in test and test-module actions.

Enable or disable linters

You can enable or disable the following linters

  • tflint
  • tfsec
  • Trivy

You can configure them at tfaction-root.yaml.

By default, tflint and tfsec are enabled and Trivy is disabled.

If you want to migrate tfsec to Trivy, please disable tfsec and enable Trivy.

tfsec:
enabled: false
trivy:
enabled: true

You can also disable tflint.

tflint:
enabled: false

tflint

tfaction runs tflint and notifies the result.

image

--

image

Fix code by tflint --fix

#2104 tfaction >= v1.13.0, tflint >= v0.47.0

Codes are fixed by tflint --fix and a commit is pushed to the feature branch.

image

By default, this feature is disabled. You can enable this by tfaction-root.yaml.

tflint:
enabled: true
fix: true # Enable `tflint --fix`

tfsec

tfaction runs tfsec and notifies the result.

image

--

mage

Trivy

image

--

image