Validate and format a WCL file
§ 1Purpose
Confirm a file conforms to its schema, then normalise its layout before committing.
§ 2Prerequisites
- The file and any files it imports are on disk.
§ 3Flowchart
§ 4Steps
§ 4.11
§ 4.2Check it parses and validates
$ wcl check config.wcl
ok
Exit codes
0 = valid, 1 = parse error, 2 = schema violation. Script against these for CI gates.
Run wcl check config.wcl. A clean run prints ok and exits 0; fix any reported parse or schema errors before moving on.
§ 4.32
§ 4.4Format in place
$ wcl fmt config.wcl --in-place
Run wcl fmt config.wcl --in-place to rewrite the file in canonical form. Indentation, brace style, number radix and string delimiters are normalised; comments and blank-line groupings survive.
§ 4.53
§ 4.6Re-check the formatted file
$ wcl check config.wcl
ok
Formatting never changes meaning, but re-run wcl check as a cheap confirmation that the rewrite is still valid.
Verification
wcl check prints ok and exits 0, and a second wcl fmt run produces no further changes.