golangci/golangci-lint · error
severities (%v) are not inside supported values (%v), fallba
Error message
severities (%v) are not inside supported values (%v), fallback to '%s'
What it means
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.
Source
Thrown at pkg/printers/printer.go:239
s.unsupportedSeverities = make(map[string]struct{})
}
s.unsupportedSeverities[severity] = struct{}{}
return s.defaultSeverity
}
func (s *severitySanitizer) Err() error {
if len(s.unsupportedSeverities) == 0 {
return nil
}
var names []string
for k := range s.unsupportedSeverities {
names = append(names, "'"+k+"'")
}
return fmt.Errorf("severities (%v) are not inside supported values (%v), fallback to '%s'",
strings.Join(names, ", "), strings.Join(s.allowedSeverities, ", "), s.defaultSeverity)
}
View on GitHub (pinned to ed7a235d2d)
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
Example fix
# before (.golangci.yml)
severity-rules:
- linters: [errcheck]
severity: MAJOR
# after
severity-rules:
- linters: [errcheck]
severity: major Defensive patterns
Strategy: validation
Validate before calling
// Go: validate severity names before configuring the printer
var allowed = map[string]bool{"error": true, "warning": true, "info": true}
for sev := range cfg.SeverityRules {
if !allowed[sev] { return fmt.Errorf("unsupported severity %q", sev) }
} Try / catch
if err := printer.Print(issues); err != nil {
if strings.Contains(err.Error(), "are not inside supported values") {
log.Fatalf("config error: %v", err)
}
return err
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- can't set severity rule option: no default severity defined
- severity should be set
- the configuration contains invalid elements
- unsupported configuration format
- the configuration contains invalid elements
AI-assisted analysis of golangci/golangci-lint@ed7a235d2d (2026-09-02).
Data as JSON: /api/errors/b11a8387da5a615e.
Report an issue: GitHub.