Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autofix support #93

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Add autofix support #93

merged 1 commit into from
Jun 13, 2023

Conversation

wata727
Copy link
Member

@wata727 wata727 commented May 2, 2023

See also terraform-linters/tflint#1755
See also terraform-linters/tflint-plugin-sdk#254

This PR adds support for autofix in the following rules:

  • terraform_comment_syntax
  • terraform_deprecated_index
  • terraform_deprecated_interpolation
  • terraform_empty_list_equality
  • terraform_required_provider
    • However, only issues with missing source can be fixed
  • terraform_unused_declarations
    • HCL native syntax only

In TFLint v0.47, tflint --fix can automatically fix these issues.

@wata727 wata727 force-pushed the autofix branch 10 times, most recently from 4740bf7 to 78929f6 Compare May 6, 2023 16:08
@wata727 wata727 force-pushed the autofix branch 3 times, most recently from f373e00 to c8ded42 Compare May 24, 2023 16:57
@wata727 wata727 force-pushed the autofix branch 9 times, most recently from cebc231 to 0722239 Compare June 2, 2023 17:36
@wata727 wata727 marked this pull request as ready for review June 8, 2023 14:46
@wata727 wata727 requested a review from bendrucker June 8, 2023 14:46
@wata727
Copy link
Member Author

wata727 commented Jun 8, 2023

@bendrucker Could you review this?

If you're interested, you can also review the PRs for the SDK and TFLint core about the autofix feature. If you have any questions, feel free to ask. Thanks!

@bendrucker
Copy link
Member

Will do!

Copy link
Member

@bendrucker bendrucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!

@wata727 wata727 merged commit ab8ad03 into main Jun 13, 2023
@wata727 wata727 deleted the autofix branch June 13, 2023 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants