golangci/golangci-lint · error

unknown group: %s

Error message

unknown group: %s

What it means

Default-branch guard in Manager.build (used by GetEnabledLintersMap/GetOptimizedLinters): the configured linter group name (presets/group selection) matched none of the known groups, so the switch fell through to default. Indicates an invalid group value in the configuration — an internal/config-level error, not a linter-level one.

Source

Thrown at pkg/lint/lintersdb/manager.go:170

			selected = append(selected, lc)
		}

		resultLintersSet = linterConfigsToMap(selected)

	case config.GroupStandard:
		var selected []*linter.Config
		for _, lc := range m.linters {
			if !lc.FromGroup(config.GroupStandard) {
				continue
			}

			selected = append(selected, lc)
		}

		resultLintersSet = linterConfigsToMap(selected)

	default:
		return nil, fmt.Errorf("unknown group: %s", groupName)
	}

	for _, name := range slices.Concat(m.cfg.Linters.Enable, m.cfg.Formatters.Enable) {
		for _, lc := range m.GetLinterConfigs(name) {
			// it's important to use lc.Name() nor name because name can be alias
			resultLintersSet[lc.Name()] = lc
		}
	}

	for _, name := range m.cfg.Linters.Disable {
		for _, lc := range m.GetLinterConfigs(name) {
			// it's important to use lc.Name() nor name because name can be alias
			delete(resultLintersSet, lc.Name())
		}
	}

	if m.cfg.Linters.FastOnly {
		for lc := range maps.Values(resultLintersSet) {

View on GitHub (pinned to ed7a235d2d)

Solutions

  1. Use one of the supported group names (e.g. 'standard') in the configuration
  2. Check for typos in the group/preset setting
  3. Verify the golangci-lint version supports the configured group
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/lint/lintersdb/manager.go:170 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of golangci/golangci-lint@ed7a235d2d (2026-09-02). Data as JSON: /api/errors/99cdbbdb4184e62c. Report an issue: GitHub.