Expand description
Pre-write validation and auto-fix for edited content.
All checks operate on in-memory content — nothing is written to disk. The caller is responsible for writing the validated/fixed content.
Post-write syntax check (post_edit_syntax_check) needs the file on disk
(runs external commands like node --check) and is called separately after write.
Structs§
- Validate
Result - Result of
validate_and_fix: the (possibly fixed) content, any warnings, and whether any auto-fix was applied.
Functions§
- post_
edit_ syntax_ check - Post-edit syntax check for common file types. Runs a fast, non-destructive check and returns a warning if syntax is broken. This needs the file to be on disk — call AFTER writing.
- validate_
and_ fix - Run all pre-write validations on the content in memory: