Skip to content

terraform fmt should add an empty line at the end of the file #23223

Open
@ralbertazzi

Description

@ralbertazzi

Current Terraform Version

0.12.12

Proposal

It's usually a good practice in many languages to have an empty line at the end of the file. Formatters like black for Python or prettier for JavaScript take care of that. terraform fmt should do the same.

Notice also that GitHub counts the missing empty line as a small error in pull requests, adding a small symbol at the end of the file when you review the changed files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clienhancementfmtBug reports and feature requests related to Terraform's auto-formatter command "terraform fmt"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions