Diagnostics

The extension provides real-time error detection for Codepurify template syntax and context paths.

Error Types

Invalid Context Paths

❌ Invalid:

✅ Valid:

Unknown Variables

❌ Invalid:

✅ Valid:

Syntax Errors

❌ Invalid:

✅ Valid:

Error Display

Errors appear as:

  • Red underline — syntax errors
  • Yellow underline — warnings
  • Hover tooltip — error description

Real-Time Validation

Errors are detected as you type:

The first two examples are incomplete but not necessarily invalid while typing. The final example is invalid because casings is not a valid property.

Common Validation Rules

Casing Properties

Use casing, not casings or case.

Invalid examples:

Array Access

Use the normalized array structure.

Invalid example:

Control Flow Tags

Control flow blocks must have matching opening and closing tags.

Invalid example:

Error Messages

Hover over diagnostics to see detailed messages, such as:

  • "casings" is not a valid property of "entity.names"
  • Missing closing tag for "if"
  • Unknown variable "unknown_property"

Performance

Validation runs in the background without affecting typing performance. Large files are processed incrementally.