jadpo fmt
On this page
Format source files.
Rewrite Jadpo files in the one layout the formatter owns: indentation, spacing, blank lines and one member per line. In a project it first fixes each file's use lines: adds a missing import, removes an unused one and sorts them. With --layout it also moves each declaration another file uses into a file of its own, as layout.promotion_required asks. With --check, change nothing and fail if any file would change. Without a path, the project is found by walking up to app.jadpo.
Also: jadpo format.
jadpo fmt [path]Arguments
path(optional): A file or folder instead of the whole project
Flags
--check: Report unformatted files and change nothing--layout: Also make the moves promotion asks for
On every command
--json: Print data for tools instead of text--help: Show every flag, with examples--color <when>: Choose when to use colour
jadpo fmt --json writes one JSON document to standard output instead of text, with the same exit code. The document has schemaVersion, command ("fmt"), ok, data (what the command produced, null when it failed) and diagnostics (each error with its rule, reason, next and help). A command that needs a terminal refuses --json and names the flags that do the same job.
Examples
# Format the project you are injadpo fmt# Make the moves layout.promotion_required asks for, then formatjadpo fmt --layout# Check formatting without changing anything, as CI doesjadpo fmt --check# Format one filejadpo fmt app.jadpo
Errors
cli.fmt_arguments: Format command has invalid arguments
Markdown for agents: /docs/jadpo-fmt.md.Built from Jadpo main at a707efb.