pub fn write_format_validate(
path: &Path,
content: &str,
config: &Config,
params: &Value,
) -> Result<WriteResult, AftError>Expand description
Write content to disk, auto-format, then validate syntax.
This is the shared tail for all mutation commands. The pipeline order is:
fs::write— persist contentauto_format— run the project formatter (reads the written file, writes back)validate_syntax— parse the (potentially formatted) filevalidate_full— run type checker ifparams.validate == "full"
The params argument carries the original request parameters. When it
contains "validate": "full", the project’s type checker is invoked after
syntax validation and the results are included in WriteResult.