{"record":{"id":"c0412f9aa27cc338","repo":"crowdsecurity/crowdsec","slug":"errfeaturenamecase","errorCode":"ErrFeatureNameCase","errorMessage":"name is not lowercase","messagePattern":"name is not lowercase","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/fflag/features.go","lineNumber":44,"sourceCode":"\npackage fflag\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"regexp\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/goccy/go-yaml\"\n\t\"github.com/sirupsen/logrus\"\n)\n\nvar (\n\tErrFeatureNameEmpty   = errors.New(\"name is empty\")\n\tErrFeatureNameCase    = errors.New(\"name is not lowercase\")\n\tErrFeatureNameInvalid = errors.New(\"invalid name (allowed a-z, 0-9, _, .)\")\n\tErrFeatureUnknown     = errors.New(\"unknown feature\")\n\tErrFeatureDeprecated  = errors.New(\"the flag is deprecated\")\n\tErrFeatureRetired     = errors.New(\"the flag is retired\")\n)\n\nconst (\n\tActiveState     = iota // the feature can be enabled, and its description is logged (Info)\n\tDeprecatedState        // the feature can be enabled, and a deprecation message is logged (Warning)\n\tRetiredState           // the feature is ignored and a deprecation message is logged (Error)\n)\n\ntype Feature struct {\n\tName  string\n\tState int // active, deprecated, retired\n\n\t// Description should be a short sentence, explaining the feature.\n\tDescription string","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/fflag/features.go#L26-L62","documentation":"Sentinel fflag.ErrFeatureNameCase: the feature-flag name contains uppercase characters; names must be lowercase to be valid. Raised by validateFeatureName when featureName != strings.ToLower(featureName).","triggerScenarios":"Thrown at pkg/fflag/features.go:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the feature flag to all-lowercase (a-z, 0-9, _, .)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}