{"record":{"id":"610a222a0788580b","repo":"Humanizr/Humanizer","slug":"unsupported-inflection-countability-countability","errorCode":null,"errorMessage":"Unsupported inflection countability '{countability}'.","messagePattern":"Unsupported inflection countability '(.+?)'\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/InflectionCatalogValidation.cs","lineNumber":409,"sourceCode":"                    out var scriptValue);\n                mask |= scriptValue;\n            }\n\n            return (uint)mask;\n        }\n\n        static byte GetCountabilityMask(ImmutableArray<string> countabilities)\n        {\n            byte mask = 0;\n            foreach (var countability in countabilities)\n            {\n                mask |= countability switch\n                {\n                    \"count\" => 1 << 0,\n                    \"mass\" => 1 << 1,\n                    \"collective\" => 1 << 2,\n                    \"plural-only\" => 1 << 3,\n                    _ => throw new InvalidOperationException(\n                        $\"Unsupported inflection countability '{countability}'.\")\n                };\n            }\n\n            return mask;\n        }\n\n        static ImmutableArray<string> NormalizeGuards(\n            ImmutableArray<string> values,\n            string casing,\n            ImmutableArray<string> ownerScripts,\n            string subject)\n        {\n            return NormalizeAuthoredTexts(\n                values,\n                casing,\n                ownerScripts,\n                subject,","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/Humanizr/Humanizer/blob/ffc2b77c0f30d2fb176875841424379319d0ae9b/src/Humanizer.SourceGenerators/Generators/ProfileCatalogs/InflectionCatalogValidation.cs#L391-L427","documentation":"The inflection catalog encodes noun countability as a bitmask from a fixed vocabulary: 'count', 'mass', 'collective', and 'plural-only'. Any other countability string in the YAML is rejected by GetCountabilityMask because it cannot be mapped to a bit position.","triggerScenarios":"A lexeme's or rule's 'countability' field contains a value not in the set {count, mass, collective, plural-only}. The switch expression's default arm throws. For example, 'uncountable' or 'singular-only' would trigger this.","commonSituations":"Using a synonym like 'uncountable' instead of 'mass'. Copying terminology from a different inflection framework with different countability labels. Typo in the countability string.","solutions":["Change the countability value to one of the four supported labels: 'count', 'mass', 'collective', or 'plural-only'.","If the concept maps to multiple categories, list them as separate entries in the countability array.","Check the locale authoring guide for the canonical countability vocabulary."],"exampleFix":"# before\nlexemes:\n  - id: 'water'\n    countability: ['uncountable']\n# after\nlexemes:\n  - id: 'water'\n    countability: ['mass']","handlingStrategy":"validation","validationCode":"# Before building, verify countability values are from the allowed set.\npython3 -c \"\nimport yaml, sys\nALLOWED = {'count','mass','collective','plural-only'}\nfor f in sys.argv[1:]:\n    d = yaml.safe_load(open(f))\n    owners = (d.get('inflection',{}).get('owners') or [])\n    for owner in owners:\n        for lex in (owner.get('lexemes') or []):\n            for c in (lex.get('countability') or []):\n                if c not in ALLOWED:\n                    print(f'{f}: unsupported countability {c!r} on lexeme {lex.get(\"id\",\"\")!r}')\n\" src/Humanizer/Locales/*.yml","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only the four canonical countability labels: count, mass, collective, plural-only.","Do not invent synonyms like 'uncountable' (use 'mass') or 'invariable' (use 'plural-only').","Keep the countability vocabulary documented in the locale authoring guide."],"tags":["inflection","source-generator","countability","yaml","build-time"],"backgroundTag":null,"analyzedSha":"ffc2b77c0f30d2fb176875841424379319d0ae9b","analyzedAt":"2026-08-13T21:42:34.584Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}