{"record":{"id":"7d4be49acc6a3485","repo":"golangci/golangci-lint","slug":"eventually-all-checks-were-disabled-at-least-one","errorCode":null,"errorMessage":"eventually all checks were disabled: at least one must be enabled","messagePattern":"eventually all checks were disabled: at least one must be enabled","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/golinters/gocritic/gocritic_settings.go","lineNumber":392,"sourceCode":"func (s *settingsWrapper) validateDisabledAndEnabledAtOneMoment() error {\n\tfor _, tag := range s.DisabledTags {\n\t\tif slices.Contains(s.EnabledTags, tag) {\n\t\t\treturn fmt.Errorf(\"tag %q disabled and enabled at one moment\", tag)\n\t\t}\n\t}\n\n\tfor _, check := range s.DisabledChecks {\n\t\tif slices.Contains(s.EnabledChecks, check) {\n\t\t\treturn fmt.Errorf(\"check %q disabled and enabled at one moment\", check)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (s *settingsWrapper) validateAtLeastOneCheckerEnabled() error {\n\tif len(s.inferredEnabledChecks) == 0 {\n\t\treturn errors.New(\"eventually all checks were disabled: at least one must be enabled\")\n\t}\n\n\treturn nil\n}\n\ntype goCriticChecks[T any] map[string]T\n\nfunc (m goCriticChecks[T]) has(name string) bool {\n\t_, ok := m[name]\n\treturn ok\n}\n\nfunc debugChecksListf(checks []string, format string, args ...any) {\n\tif !isDebug {\n\t\treturn\n\t}\n\n\tv := slices.Sorted(slices.Values(checks))","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/golinters/gocritic/gocritic_settings.go#L374-L410","documentation":"Sentinel validation error from validateAtLeastOneCheckerEnabled, called after gocritic resolves tags/checks into inferredEnabledChecks: the final computed set of enabled checks is empty (everything disabled, directly or via tags), so gocritic would report nothing. It fires after option-combination checks as a final consistency gate.","triggerScenarios":"Thrown at pkg/golinters/gocritic/gocritic_settings.go:392 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable at least one gocritic check or tag","Remove disabled-checks/disabled-tags entries that eliminate all checks","Remove disable-all or pair it with enabled-checks/enabled-tags"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}