{"record":{"id":"00ff514b44b31c1a","repo":"golangci/golangci-lint","slug":"disabled-tag-q-doesn-t-exist-see-s-s-documentat","errorCode":null,"errorMessage":"disabled tag %q doesn't exist, see %s's documentation","messagePattern":"disabled tag %q doesn't exist, see (.+?)'s documentation","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/golinters/gocritic/gocritic_settings.go","lineNumber":339,"sourceCode":"\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}\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}","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/golinters/gocritic/gocritic_settings.go#L321-L357","documentation":"golangci-lint's gocritic wrapper validates that every tag listed under gocritic.settings.disabled-tags actually exists among gocritic's known check tags. If a tag name doesn't match any known tag, configuration parsing fails with this error before any code is linted.","triggerScenarios":"Running golangci-lint with config settings.gocritic.disabled-tags containing a tag that gocritic does not define (typo, renamed tag, or tag from a different linter). validateCheckerTags checks each tag against allChecksByTag.","commonSituations":"Typos like 'style' vs 'styling', copying tags from golangci-lint's other linters, gocritic adding/renaming tags in a version upgrade so a previously valid tag disappears.","solutions":["Fix the tag spelling in .golangci.yml under settings.gocritic.disabled-tags","Run 'golangci-lint cache clean' is irrelevant; instead check valid tags via 'go vet' tooling or gocritic docs / 'golangci-lint help gocritic' style listing","Remove the unknown tag from disabled-tags if disabling it is not needed","Pin golangci-lint/gocritic version and confirm the tag exists in that version"],"exampleFix":"// before (.golangci.yml)\nsettings:\n  gocritic:\n    disabled-tags:\n      - stylig\n// after\nsettings:\n  gocritic:\n    disabled-tags:\n      - style","handlingStrategy":"validation","validationCode":"const validGocriticTags = new Set(['diagnostic','style','performance','experimental','opinionated','security'])\nfunction assertTagsValid(tags) {\n  const bad = tags.filter(t => !validGocriticTags.has(t))\n  if (bad.length) throw new Error(`unknown gocritic tags: ${bad.join(', ')}`)\n}\nassertTagsValid(cfg.settings.gocritic['disabled-tags'] ?? [])","typeGuard":"const isKnownGocriticTag = (t) => ['diagnostic','style','performance','experimental','opinionated','security'].includes(t)","tryCatchPattern":null,"preventionTips":["Verify config with 'golangci-lint config verify' before committing","Keep disabled-tags limited to documented gocritic tags","Pin golangci-lint version and re-verify tags after upgrades"],"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"}