github.com/terraform-linters/tflint@v0.51.2-0.20240520175844-3750771571b6/docs/user-guide/autofix.md (about) 1 # Autofix 2 3 Some issues reported by TFLint can be auto-fixable. Auto-fixable issues are marked as "Fixable" as follows: 4 5 ```console 6 $ tflint 7 1 issue(s) found: 8 9 Warning: [Fixable] Single line comments should begin with # (terraform_comment_syntax) 10 11 on main.tf line 1: 12 1: // locals values 13 2: locals { 14 15 ``` 16 17 When run with the `--fix` option, TFLint will fix issues automatically. 18 19 ```console 20 $ tflint --fix 21 1 issue(s) found: 22 23 Warning: [Fixed] Single line comments should begin with # (terraform_comment_syntax) 24 25 on main.tf line 1: 26 1: // locals values 27 2: locals { 28 29 ``` 30 31 Please note that not all issues are fixable. The rule must support autofix. 32 33 If autofix is applied, it will automatically format the entire file. As a result, unrelated ranges may change.