format_mql
Formats MQL source files using clang-format while protecting MQL-specific syntax. Reports changes by default; set write=true to apply formatting.
Instructions
Format an MQL file with clang-format (MQL literals such as D'…' and input group lines are protected).
Default is a dry run reporting whether the file would change; pass write=true to apply.
Replaces format_check.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | clang-format style string; defaults to an MQL-friendly LLVM-based profile. | |
| write | No | false = report/diff only (default); true = overwrite the file in its original encoding. | |
| source | Yes | Absolute Windows path to the .mq4/.mq5/.mqh source file. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||