Skip to content

Support running controversial/experimental rules individually #251

@maxbrunet

Description

@maxbrunet

Certain rules are preferred to be excluded from the global formatting, but it can be interesting to suggest them as individual quick fixes. Providing an API to run them individually would allow the creation of specific code actions in gopls (golang/go#56403)

There are at least 2 potential candidates at the moment:

gofumpt/format/format.go

Lines 645 to 648 in 70d7433

// Merging adjacent fields (e.g. parameters) is disabled by default.
if !f.ExtraRules {
break
}

gofumpt/format/format.go

Lines 755 to 759 in 70d7433

if os.Getenv("GOFUMPT_SPLIT_LONG_LINES") != "on" {
// By default, this feature is turned off.
// Turn it on by setting GOFUMPT_SPLIT_LONG_LINES=on.
return
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions