golangci/golangci-lint · error

all checks were disabled, but no one check was enabled: at l

Error message

all checks were disabled, but no one check was enabled: at least one must be enabled

What it means

Thrown by validateOptionsCombinations in the gocritic DisableAll branch: disable-all is set but neither enabled-tags nor enabled-checks supplies any check to turn back on, leaving gocritic with zero checks to run. The linter treats this as a misconfiguration and aborts rather than silently doing nothing.

Source

Thrown at pkg/golinters/gocritic/gocritic_settings.go:323

		if len(s.EnabledTags) > 0 {
			return errors.New("enable-all and enabled-tags options must not be combined")
		}

		if len(s.EnabledChecks) > 0 {
			return errors.New("enable-all and enabled-checks options must not be combined")
		}

	case s.DisableAll:
		if len(s.DisabledTags) > 0 {
			return errors.New("disable-all and disabled-tags options must not be combined")
		}

		if len(s.DisabledChecks) > 0 {
			return errors.New("disable-all and disabled-checks options must not be combined")
		}

		if len(s.EnabledTags) == 0 && len(s.EnabledChecks) == 0 {
			return errors.New("all checks were disabled, but no one check was enabled: at least one must be enabled")
		}
	}

	return nil
}

func (s *settingsWrapper) validateCheckerTags() error {
	for _, tag := range s.EnabledTags {
		if !s.allChecksByTag.has(tag) {
			return fmt.Errorf("enabled tag %q doesn't exist, see %s's documentation", tag, linterName)
		}
	}

	for _, tag := range s.DisabledTags {
		if !s.allChecksByTag.has(tag) {
			return fmt.Errorf("disabled tag %q doesn't exist, see %s's documentation", tag, linterName)
		}
	}

View on GitHub (pinned to ed7a235d2d)

Solutions

  1. Add at least one entry to enabled-checks or enabled-tags alongside disable-all
  2. Or drop disable-all and rely on explicit disabled-checks/disabled-tags
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/golinters/gocritic/gocritic_settings.go:323 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/6dc20e8ed7d5b336. Report an issue: GitHub.