{"record":{"id":"b11a8387da5a615e","repo":"golangci/golangci-lint","slug":"severities-v-are-not-inside-supported-values","errorCode":null,"errorMessage":"severities (%v) are not inside supported values (%v), fallback to '%s'","messagePattern":"severities \\((.+?)\\) are not inside supported values \\((.+?)\\), fallback to '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/printers/printer.go","lineNumber":239,"sourceCode":"\t\ts.unsupportedSeverities = make(map[string]struct{})\n\t}\n\n\ts.unsupportedSeverities[severity] = struct{}{}\n\n\treturn s.defaultSeverity\n}\n\nfunc (s *severitySanitizer) Err() error {\n\tif len(s.unsupportedSeverities) == 0 {\n\t\treturn nil\n\t}\n\n\tvar names []string\n\tfor k := range s.unsupportedSeverities {\n\t\tnames = append(names, \"'\"+k+\"'\")\n\t}\n\n\treturn fmt.Errorf(\"severities (%v) are not inside supported values (%v), fallback to '%s'\",\n\t\tstrings.Join(names, \", \"), strings.Join(s.allowedSeverities, \", \"), s.defaultSeverity)\n}\n","sourceCodeStart":221,"sourceCodeEnd":242,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/printers/printer.go#L221-L242","documentation":"golangci-lint's severity printer refuses to run when the user's configured severity rules reference severity names that the printer does not support. It builds a quoted list of the offending severity names and the list of allowed ones, then returns this error so the run fails fast instead of silently mislabeling issues. The message mentions a fallback default severity, but the error still aborts the printer.","triggerScenarios":"Calling Print on a severity printer created with unsupportedSeverities containing names not present in allowedSeverities — e.g. severity rules in .golangci.yml mapping linters to severity strings that are not one of the configured supported severities.","commonSituations":"Typo in a severity name under linterview settings (e.g. 'erorr' or 'Warning' vs 'warning'); using default severity names like 'info'/'hint' after overriding the supported severity set with a custom list; upgrading golangci-lint where the default severity vocabulary changed.","solutions":["Fix the severity names in your severity rules so each matches one of the supported values listed in the error","Add the missing severity name to the supported severities list in your config (severity-rules / default-severity settings)","Use the default severity for those rules until the config is corrected"],"exampleFix":"# before (.golangci.yml)\nseverity-rules:\n  - linters: [errcheck]\n    severity: MAJOR\n# after\nseverity-rules:\n  - linters: [errcheck]\n    severity: major","handlingStrategy":"validation","validationCode":"// Go: validate severity names before configuring the printer\nvar allowed = map[string]bool{\"error\": true, \"warning\": true, \"info\": true}\nfor sev := range cfg.SeverityRules {\n    if !allowed[sev] { return fmt.Errorf(\"unsupported severity %q\", sev) }\n}","typeGuard":null,"tryCatchPattern":"if err := printer.Print(issues); err != nil {\n    if strings.Contains(err.Error(), \"are not inside supported values\") {\n        log.Fatalf(\"config error: %v\", err)\n    }\n    return err\n}","preventionTips":["Keep severity names lowercase and consistent across rules","Only use severities from the supported list documented for your golangci-lint version","Lint your .golangci.yml in CI before running analysis"],"tags":["config","severity","golangci-lint"],"backgroundTag":"invalid-config-value","analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}