{"record":{"id":"4c3bdf010031f20d","repo":"go-task/task","slug":"task-output-style-q-not-recognized","errorCode":null,"errorMessage":"task: output style %q not recognized","messagePattern":"task: output style %q not recognized","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/output/output.go","lineNumber":38,"sourceCode":"\tswitch o.Name {\n\tcase \"interleaved\", \"\":\n\t\tif err := checkOutputGroupUnset(o); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn Interleaved{}, nil\n\tcase \"group\":\n\t\treturn Group{\n\t\t\tBegin:     o.Group.Begin,\n\t\t\tEnd:       o.Group.End,\n\t\t\tErrorOnly: o.Group.ErrorOnly,\n\t\t}, nil\n\tcase \"prefixed\":\n\t\tif err := checkOutputGroupUnset(o); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn NewPrefixed(logger), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(`task: output style %q not recognized`, o.Name)\n\t}\n}\n\nfunc checkOutputGroupUnset(o *ast.Output) error {\n\tif o.Group.IsSet() {\n\t\treturn fmt.Errorf(\"task: output style %q does not support the group begin/end parameter\", o.Name)\n\t}\n\treturn nil\n}\n","sourceCodeStart":20,"sourceCodeEnd":48,"githubUrl":"https://github.com/go-task/task/blob/385e5ad92af02877b6d7cf9dcc963b5ed916e70a/internal/output/output.go#L20-L48","documentation":"The `output:` option in a Taskfile is validated against the supported styles (interleaved, group, prefixed). BuildFor returns this error when o.Name doesn't match any known style. It surfaces during executor setup via setupOutput, before any task runs.","triggerScenarios":"A task or Taskfile sets `output: <style>` with an unrecognized style name, and setupOutput calls output.BuildFor to construct the output wrapper.","commonSituations":"Typos like `output: prefix` or `output: grouped`, inventing styles not in the current Task version (e.g. `output: json`), or mixed-case values (`output: Group`).","solutions":["Use a supported output style: interleaved, group, or prefixed","Remove the `output:` key to fall back to the default (interleaved) behavior","Check your Task version's docs — newer styles may not exist in older releases"],"exampleFix":"# before\noutput: grouped\n# after\noutput: group","handlingStrategy":"validation","validationCode":"var validOutputStyles = map[string]bool{\"interleaved\":true,\"group\":true,\"prefixed\":true}\nif o := taskDef.Output; o != nil && !validOutputStyles[o.Style] {\n  return fmt.Errorf(\"unknown output style %q\", o.Style)\n}","typeGuard":null,"tryCatchPattern":"err := t.Run(ctx)\nif err != nil && strings.Contains(err.Error(), \"output style\") {\n  // strip output: key (default interleaved) and retry\n}","preventionTips":["Use only documented styles: interleaved, group, prefixed","Validate Taskfiles against the JSON schema","Avoid inventing style names; check version-specific docs"],"tags":["taskfile","output","configuration"],"backgroundTag":"invalid-enum-value","analyzedSha":"385e5ad92af02877b6d7cf9dcc963b5ed916e70a","analyzedAt":"2026-09-05T09:01:05.226Z","contentChangedAt":"2026-09-05T09:01:05.226Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}