{"record":{"id":"6dc20e8ed7d5b336","repo":"golangci/golangci-lint","slug":"all-checks-were-disabled-but-no-one-check-was-ena","errorCode":null,"errorMessage":"all checks were disabled, but no one check was enabled: at least one must be enabled","messagePattern":"all checks were disabled, but no one check was enabled: at least one must be enabled","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/golinters/gocritic/gocritic_settings.go","lineNumber":323,"sourceCode":"\t\tif len(s.EnabledTags) > 0 {\n\t\t\treturn errors.New(\"enable-all and enabled-tags options must not be combined\")\n\t\t}\n\n\t\tif len(s.EnabledChecks) > 0 {\n\t\t\treturn errors.New(\"enable-all and enabled-checks options must not be combined\")\n\t\t}\n\n\tcase s.DisableAll:\n\t\tif len(s.DisabledTags) > 0 {\n\t\t\treturn errors.New(\"disable-all and disabled-tags options must not be combined\")\n\t\t}\n\n\t\tif len(s.DisabledChecks) > 0 {\n\t\t\treturn errors.New(\"disable-all and disabled-checks options must not be combined\")\n\t\t}\n\n\t\tif len(s.EnabledTags) == 0 && len(s.EnabledChecks) == 0 {\n\t\t\treturn errors.New(\"all checks were disabled, but no one check was enabled: at least one must be enabled\")\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (s *settingsWrapper) validateCheckerTags() error {\n\tfor _, tag := range s.EnabledTags {\n\t\tif !s.allChecksByTag.has(tag) {\n\t\t\treturn fmt.Errorf(\"enabled tag %q doesn't exist, see %s's documentation\", tag, linterName)\n\t\t}\n\t}\n\n\tfor _, tag := range s.DisabledTags {\n\t\tif !s.allChecksByTag.has(tag) {\n\t\t\treturn fmt.Errorf(\"disabled tag %q doesn't exist, see %s's documentation\", tag, linterName)\n\t\t}\n\t}","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/golinters/gocritic/gocritic_settings.go#L305-L341","documentation":"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.","triggerScenarios":"Thrown at pkg/golinters/gocritic/gocritic_settings.go:323 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add at least one entry to enabled-checks or enabled-tags alongside disable-all","Or drop disable-all and rely on explicit disabled-checks/disabled-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"}