-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
2,217 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Autofix | ||
|
||
Some issues reported by TFLint can be auto-fixable. Auto-fixable issues are marked as "Fixable" as follows: | ||
|
||
```console | ||
$ tflint | ||
1 issue(s) found: | ||
|
||
Warning: [Fixable] Single line comments should begin with # (terraform_comment_syntax) | ||
|
||
on main.tf line 1: | ||
1: // locals values | ||
2: locals { | ||
|
||
``` | ||
|
||
When run with the `--fix` option, TFLint will fix issues automatically. | ||
|
||
```console | ||
$ tflint --fix | ||
1 issue(s) found: | ||
|
||
Warning: [Fixed] Single line comments should begin with # (terraform_comment_syntax) | ||
|
||
on main.tf line 1: | ||
1: // locals values | ||
2: locals { | ||
|
||
``` | ||
|
||
Please note that not all issues are fixable. The rule must support autofix. | ||
|
||
If autofix is applied, it will automatically format the entire file. As a result, unrelated ranges may change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ type Formatter struct { | |
Stdout io.Writer | ||
Stderr io.Writer | ||
Format string | ||
Fix bool | ||
NoColor bool | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.