{"record":{"id":"dc84fb04ce561740","repo":"golangci/golangci-lint","slug":"enabled-check-q-doesn-t-exist-see-s-s-documenta","errorCode":null,"errorMessage":"enabled check %q doesn't exist, see %s's documentation","messagePattern":"enabled check %q doesn't exist, see (.+?)'s documentation","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/golinters/gocritic/gocritic_settings.go","lineNumber":349,"sourceCode":"\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}\n\n\treturn nil\n}\n\nfunc (s *settingsWrapper) validateCheckerNames() error {\n\tfor _, check := range s.EnabledChecks {\n\t\tif !s.allChecks.has(check) {\n\t\t\treturn fmt.Errorf(\"enabled check %q doesn't exist, see %s's documentation\", check, linterName)\n\t\t}\n\t}\n\n\tfor _, check := range s.DisabledChecks {\n\t\tif !s.allChecks.has(check) {\n\t\t\treturn fmt.Errorf(\"disabled check %q doesn't exist, see %s documentation\", check, linterName)\n\t\t}\n\t}\n\n\tfor check := range s.SettingsPerCheck {\n\t\tlcName := strings.ToLower(check)\n\n\t\tif !s.allChecksLowerCased.has(lcName) {\n\t\t\treturn fmt.Errorf(\"invalid check settings: check %q doesn't exist, see %s documentation\", check, linterName)\n\t\t}\n\n\t\tif !s.inferredEnabledChecksLowerCased.has(lcName) {\n\t\t\ts.logger.Warnf(\"%s: settings were provided for disabled check %q\", check, linterName)","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/golinters/gocritic/gocritic_settings.go#L331-L367","documentation":"The gocritic settings wrapper validates that each check name in settings.gocritic.enabled-checks is a real gocritic check. An unknown check name aborts the run with this error, pointing at gocritic's documentation.","triggerScenarios":"Config contains settings.gocritic.enabled-checks with a check name not present in gocritic's check registry (allChecks.has(check) fails): typo, removed check, or check from another linter.","commonSituations":"Misspelled check names like 'singleCaseSwitch' vs 'singleCaseSwitch' casing variants, using checks removed in a gocritic upgrade, copying check names from staticcheck.","solutions":["Correct the check name in settings.gocritic.enabled-checks (match gocritic's exact check name)","List available checks for your gocritic version and pick a valid name","Remove the unknown check from enabled-checks","Upgrade or downgrade golangci-lint so the check exists in that gocritic version"],"exampleFix":"// before (.golangci.yml)\nsettings:\n  gocritic:\n    enabled-checks:\n      - rangeValCopyz\n// after\nsettings:\n  gocritic:\n    enabled-checks:\n      - rangeValCopy","handlingStrategy":"validation","validationCode":"const knownChecks = new Set(getGocriticChecksForVersion()) // from 'golangci-lint help' or docs\nconst bad = cfg.settings.gocritic['enabled-checks'].filter(c => !knownChecks.has(c))\nif (bad.length) throw new Error(`unknown gocritic checks: ${bad.join(', ')}`)","typeGuard":"const isKnownGocriticCheck = (c) => knownChecks.has(c)","tryCatchPattern":null,"preventionTips":["Copy check names exactly from gocritic's documentation, never by memory","Run 'golangci-lint config verify' in CI to catch stale names","Re-validate check names after each golangci-lint/gocritic upgrade"],"tags":["golangci-lint","gocritic","configuration"],"backgroundTag":"invalid-linter-config-option","analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}