Skip to content

Sort by linter and not just line number #4197

Closed
@x528491x

Description

@x528491x

Your feature request related to a problem? Please describe.

When using the CLI with --sort-results, it only sorts by line number. I usually run --enable-all and to catch all lint errs and I want to be able to sort by linter in an alphabetical order. Even using the tabbed output format is not straightforward because the spaces between the columns are arbitrary and not an actual single tab.

Describe the solution you'd like.

An inbuilt --sort-results-by-linter would be great.

Describe alternatives you've considered.

golangci-lint run --enable-all --out-format=tab | sed "s/ \+ /\t/g" | sort -t" " -k2

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: outputRelated to issue outputenhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions