{"record":{"id":"a84566852102d44b","repo":"golangci/golangci-lint","slug":"disabled-check-q-doesn-t-exist-see-s-documentat","errorCode":null,"errorMessage":"disabled check %q doesn't exist, see %s documentation","messagePattern":"disabled check %q doesn't exist, see (.+?) documentation","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/golinters/gocritic/gocritic_settings.go","lineNumber":355,"sourceCode":"\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)\n\t\t}\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/golinters/gocritic/gocritic_settings.go#L337-L373","documentation":"Like enabled checks, every check in settings.gocritic.disabled-checks must exist in gocritic's registry. An unknown name fails configuration validation with this error (note the message says 'see %s documentation' without the possessive).","triggerScenarios":"Config's settings.gocritic.disabled-checks contains a check name absent from allChecks; validateCheckerNames iterates DisabledChecks and returns this error on first miss.","commonSituations":"Typos when disabling noisy checks, disabling a check that was renamed/removed in a newer gocritic, mixing up per-check settings keys with disabled-checks entries.","solutions":["Fix the check name spelling in settings.gocritic.disabled-checks","Verify the check exists in your gocritic version's check list","Remove the invalid entry if the check doesn't exist anyway","If intending per-check settings, put it under settings.gocritic.settings instead"],"exampleFix":"// before (.golangci.yml)\nsettings:\n  gocritic:\n    disabled-checks:\n      - ifElseChian\n// after\nsettings:\n  gocritic:\n    disabled-checks:\n      - ifElseChain","handlingStrategy":"validation","validationCode":"const knownChecks = new Set(getGocriticChecksForVersion())\nconst bad = cfg.settings.gocritic['disabled-checks'].filter(c => !knownChecks.has(c))\nif (bad.length) throw new Error(`unknown gocritic checks in disabled-checks: ${bad.join(', ')}`)","typeGuard":"const isKnownGocriticCheck = (c) => knownChecks.has(c)","tryCatchPattern":null,"preventionTips":["Treat disabled-checks entries as strongly as enabled ones — both are validated","Include config verification in CI","Clean up disable entries for checks that no longer exist"],"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"}