{"record":{"id":"e7344c6f00d28493","repo":"golangci/golangci-lint","slug":"unsupported-output-path-mode-q","errorCode":null,"errorMessage":"unsupported output path mode %q","messagePattern":"unsupported output path mode %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/output.go","lineNumber":58,"sourceCode":"\t\tif strings.Count(all, order) > 1 {\n\t\t\treturn fmt.Errorf(\"the sort-order name %q is repeated several times\", order)\n\t\t}\n\n\t\tif !slices.Contains(validOrders, order) {\n\t\t\treturn fmt.Errorf(\"unsupported sort-order name %q\", order)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (o *Output) validatePathMode() error {\n\tswitch o.PathMode {\n\tcase \"\", fsutils.OutputPathModeAbsolute:\n\t\t// Valid\n\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported output path mode %q\", o.PathMode)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":40,"sourceCodeEnd":63,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/config/output.go#L40-L63","documentation":"This error is thrown when output.path-mode is set to something other than the empty string or an allowed path mode constant from fsutils (e.g. OutputPathModeAbsolute). The switch in validatePathMode treats only \"\" and the valid fsutils constants as valid and rejects everything else. It signals an invalid value for how file paths are rendered in output.","triggerScenarios":"Setting output.path-mode in .golangci.yml to a value like 'absolute-x' or 'rel' that is not one of the supported fsutils output path modes, then running golangci-lint or Output.Validate().","commonSituations":"Typos in the path-mode name; copying a value from an older golangci-lint version where different mode strings were used; hand-editing config without checking docs.","solutions":["Set output.path-mode to a valid mode, e.g. 'abs' (absolute) or remove the key entirely to use the default","Check fsutils output path mode constants (fsutils.OutputPathModeAbsolute etc.) for exact accepted values in your version"],"exampleFix":"// before\noutput:\n  path-mode: absolute-path\n// after\noutput:\n  path-mode: abs","handlingStrategy":"validation","validationCode":"allowed := []string{\"\", \"abs\"} // see fsutils output path mode constants\nif !slices.Contains(allowed, cfg.Output.PathMode) {\n  return fmt.Errorf(\"path-mode %q not allowed\", cfg.Output.PathMode)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set path-mode only to values documented for your golangci-lint version","Leave path-mode unset unless you specifically need absolute paths","Pin golangci-lint version and keep config aligned with it"],"tags":["config","validation","path-mode"],"backgroundTag":"invalid-config-value","analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}