{"record":{"id":"4a7b01f217d2b443","repo":"dianping/cat","slug":"expected-end-of-value-but-found-part","errorCode":null,"errorMessage":"Expected end of value but found '{part}'.","messagePattern":"Expected end of value but found '(.+?)'\\.","errorType":"validation","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"cat-home/src/main/webapp/assets/js/editor/worker-css.js","lineNumber":3603,"sourceCode":"\n        if (!ValidationTypes.isAny(expression, simple)) {\n            if (ValidationTypes.isAny(expression, \"behind\")) {\n                behind = true;\n                valid = true;\n            }\n\n            if (ValidationTypes.isAny(expression, direction)) {\n                valid = true;\n                if (!behind) {\n                    ValidationTypes.isAny(expression, \"behind\");\n                }\n            }\n        }\n\n        if (expression.hasNext()) {\n            part = expression.next();\n            if (valid) {\n                throw new ValidationError(\"Expected end of value but found '\" + part + \"'.\", part.line, part.col);\n            } else {\n                throw new ValidationError(\"Expected (<'azimuth'>) but found '\" + part + \"'.\", part.line, part.col);\n            }\n        }\n    },\n    \"backface-visibility\"           : \"visible | hidden\",\n    \"background\"                    : 1,\n    \"background-attachment\"         : { multi: \"<attachment>\", comma: true },\n    \"background-clip\"               : { multi: \"<box>\", comma: true },\n    \"background-color\"              : \"<color> | inherit\",\n    \"background-image\"              : { multi: \"<bg-image>\", comma: true },\n    \"background-origin\"             : { multi: \"<box>\", comma: true },\n    \"background-position\"           : { multi: \"<bg-position>\", comma: true },\n    \"background-repeat\"             : { multi: \"<repeat-style>\" },\n    \"background-size\"               : { multi: \"<bg-size>\", comma: true },\n    \"baseline-shift\"                : \"baseline | sub | super | <percentage> | <length>\",\n    \"behavior\"                      : 1,\n    \"binding\"                       : 1,","sourceCodeStart":3585,"sourceCodeEnd":3621,"githubUrl":"https://github.com/dianping/cat/blob/e815e74d4c2dd74edac831241f1253fcc7d25381/cat-home/src/main/webapp/assets/js/editor/worker-css.js#L3585-L3621","documentation":"A CSSLint-style ValidationError raised by the custom validator for the `azimuth` property (a legacy CSS2 aural property kept in the validator table). The validator matched a valid azimuth expression but the value expression still has tokens left over, meaning the declaration contains more than one value where only one (optionally compound) azimuth is allowed. It carries the offending part's line/col.","triggerScenarios":"Declarations like `azimuth: behind 45deg behind`, `azimuth: left-side extra`, `azimuth: 30deg 40deg` — the first tokens parse as a valid azimuth, then `expression.hasNext()` is still true and the leftover part is reported.","commonSituations":"Copy-pasted aural CSS from ancient templates; property name intended to be different (`azimuth` used where `transform: rotate()` was meant); LLM/autocompleted CSS adding junk after a valid value.","solutions":["Reduce the value to a single valid azimuth: one angle (`45deg`), one positional keyword (`left-side`, `behind`, `center`), or `behind` + one keyword/angle as the grammar allows.","If this property is meaningless in your project (it is obsolete/aural), delete the declaration entirely.","If a compound aural effect was intended, verify against the CSS2 grammar and drop the extra token the message names.","Remove the `azimuth` entry from your linter's property table if you must keep the declarations unvalidated."],"exampleFix":"/* before */\n.voice { azimuth: behind 45deg behind; } /* Expected end of value but found 'behind' */\n\n/* after */\n.voice { azimuth: behind 45deg; }","handlingStrategy":"try-catch","validationCode":"// azimuth is single-valued; reject declarations with >2 tokens before validating\nfunction prevalidateAzimuth(decl) {\n  if (decl.property === 'azimuth' && decl.value.split(/\\s+/).length > 2) return 'too many values for azimuth';\n  return null;\n}","typeGuard":null,"tryCatchPattern":"try {\n  Validation.validate(property, value);\n} catch (ex) {\n  if (ex instanceof ValidationError || /end of value/.test(ex.message)) { addLint(ex.line, ex.col, ex.message); continue; }\n  throw ex;\n}","preventionTips":["Treat validation throws as lint output, not crashes — catch ValidationError and keep parsing.","Delete obsolete aural properties (azimuth) instead of maintaining their values.","Feed declarations through the validator one at a time so one bad value cannot abort a batch."],"tags":["css","validation","azimuth","property-value","legacy"],"backgroundTag":null,"analyzedSha":"e815e74d4c2dd74edac831241f1253fcc7d25381","analyzedAt":"2026-08-14T14:22:34.512Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}