Skip to content

cmd/gofmt: allow same level indent for block comments #38204

@dsnet

Description

@dsnet

Given the following code:

/*
someDisabledCode()
*/

It will be reformatted as:

/*
	someDisabledCode()
*/

(notice the indent it injects)

This is frustrating for users who need to maintain patches since it means that there is now a potentially massive diff when trying to comment large blocks of code in a patch.

Would it be possible for gofmt to stop trying to indent everything within the block comments?

\cc @griesemer

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions