Skip to content

Proposal: Allow gofmt to return non-zero if code violations are found #24230

Closed
@ryanm101

Description

@ryanm101

What version of Go are you using (go version)?

1.8.3

Does this issue reproduce with the latest release?

Yes

gofmt is a great way to refactor code for developers however in it's current form it requires the developer to actively execute it against their code.

If we add an option to allow gofmt to return a non-zero value if violations are found it would facilitate the integration of it into our build pipelines as we could force builds to fail upon a violation.

This would also reduce the need for 3rd party linting tools such as golint.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions