{"record":{"id":"bbcb13d8c3fe816b","repo":"golangci/golangci-lint","slug":"enabled-tag-q-doesn-t-exist-see-s-s-documentati","errorCode":null,"errorMessage":"enabled tag %q doesn't exist, see %s's documentation","messagePattern":"enabled tag %q doesn't exist, see (.+?)'s documentation","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/golinters/gocritic/gocritic_settings.go","lineNumber":333,"sourceCode":"\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}\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}","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/golangci/golangci-lint/blob/ed7a235d2d771152056fdc142a9855567c5796a9/pkg/golinters/gocritic/gocritic_settings.go#L315-L351","documentation":"gocritic settings let users enable whole tag groups (style, performance, diagnostic, experimental, opinionated). validateCheckerTags iterates settings.gocritic.enabled-tags and fails if a tag isn't a known gocritic check tag, pointing you to the linter documentation.","triggerScenarios":"enabled-tags contains a value not in gocritic's tag set — e.g. 'perf' instead of 'performance', 'bugs' instead of 'diagnostic', or a custom tag — when validateCheckerTags runs during gocritic settings build.","commonSituations":"Guessing tag names (perf/bug/style-ish variants), copying enabled-tags from other linters (staticcheck-style tags like 'SA'), gocritic adding/renaming tags across versions.","solutions":["Use one of the valid tags: diagnostic, style, performance, experimental, opinionated","Fix abbreviations/typos (perf -> performance)","Remove the invalid tag from enabled-tags","Check the gocritic documentation linked in the error for the current tag list"],"exampleFix":"# before\nlinters-settings:\n  gocritic:\n    enabled-tags:\n      - perf\n# after\nlinters-settings:\n  gocritic:\n    enabled-tags:\n      - performance","handlingStrategy":"validation","validationCode":"validTags := map[string]bool{\"diagnostic\": true, \"style\": true, \"performance\": true, \"experimental\": true, \"opinionated\": true}\nfor _, tag := range cfg.Gocritic.EnabledTags {\n    if !validTags[tag] {\n        return fmt.Errorf(\"invalid gocritic enabled-tag %q; allowed: diagnostic|style|performance|experimental|opinionated\", tag)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := golangci.Run(); err != nil {\n    if strings.Contains(err.Error(), \"doesn't exist, see\") && strings.Contains(err.Error(), \"documentation\") {\n        fmt.Fprintln(os.Stderr, \"fix gocritic enabled-tags/disabled-tags to documented gocritic tags\")\n        os.Exit(1)\n    }\n    return err\n}","preventionTips":["Use only documented gocritic tags: diagnostic, style, performance, experimental, opinionated","Don't reuse tag vocabularies from other linters (staticcheck SA..., 'perf')","Re-validate tags after golangci-lint upgrades since tag sets can change"],"tags":["golangci-lint","gocritic","configuration","tags"],"backgroundTag":"invalid-enum-config-value","analyzedSha":"ed7a235d2d771152056fdc142a9855567c5796a9","analyzedAt":"2026-09-02T18:47:33.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}