{"record":{"id":"dcd73a396d594c6b","repo":"golangci/golangci-lint","slug":"unsupported-sort-order-name-q-dcd73a","errorCode":null,"errorMessage":"unsupported sort-order name %q","messagePattern":"unsupported sort-order name %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/result/processors/sort_results.go","lineNumber":67,"sourceCode":"\t\t},\n\t\tcfg: cfg,\n\t}\n}\n\nfunc (SortResults) Name() string { return \"sort_results\" }\n\n// Process is performing sorting of the result issues.\nfunc (p SortResults) Process(issues []*result.Issue) ([]*result.Issue, error) {\n\tif len(p.cfg.SortOrder) == 0 {\n\t\tp.cfg.SortOrder = []string{orderNameLinter, orderNameFile}\n\t}\n\n\tvar cmps []issueComparator\n\n\tfor _, name := range p.cfg.SortOrder {\n\t\tc, ok := p.cmps[name]\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"unsupported sort-order name %q\", name)\n\t\t}\n\n\t\tcmps = append(cmps, c...)\n\t}\n\n\tcomp := mergeComparators(cmps...)\n\n\tslices.SortFunc(issues, func(a, b *result.Issue) int {\n\t\treturn comp(a, b)\n\t})\n\n\treturn issues, nil\n}\n\nfunc (SortResults) Finish() {}\n\nfunc byFileName(a, b *result.Issue) int {\n\treturn strings.Compare(a.FilePath(), b.FilePath())","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/result/processors/sort_results.go#L49-L85","documentation":"The sort-results processor builds its comparator chain from the configured output.sort-order names; each name must exist in the processor's comparator map. An unknown name aborts processing. This is a configuration validation error.","triggerScenarios":"Setting output.sort-order in .golangci.yml to a name not among the supported comparators (e.g. a typo like \"fiel\" instead of \"file\", or a name removed in a newer golangci-lint version).","commonSituations":"Copy-pasted config from blog posts with outdated sort-order values; upgrading golangci-lint where sort-order options were renamed or removed (sort-results boolean replaced by sort-order list); YAML indentation mistakes merging wrong values.","solutions":["Use only supported sort-order values (e.g. file, linter, severity) in output.sort-order","Check `golangci-lint help` or docs for your version's supported sort-order names","Fix typos/quotes in .golangci.yml; validate with `golangci-lint config verify` if available","Pin documentation examples to your installed golangci-lint version"],"exampleFix":"# before (.golangci.yml)\noutput:\n  sort-order: [fiel, severity]\n// after\noutput:\n  sort-order: [file, linter, severity]","handlingStrategy":"validation","validationCode":"supported := map[string]bool{\"file\": true, \"linter\": true, \"severity\": true}\nfor _, name := range cfg.Output.SortOrder {\n    if !supported[name] {\n        return fmt.Errorf(\"unsupported sort-order %q\", name)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only documented sort-order names for your golangci-lint version","Run `golangci-lint config verify` after editing config","Re-check sort-order after upgrading golangci-lint (options change across versions)","Keep config examples from version-matched docs only"],"tags":["golangci-lint","configuration","sort-order"],"backgroundTag":"invalid-config-value","analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}