Skip to content

mxcli fmt outputs to stdout instead of in-place, ignores invalid input #398

@retran

Description

@retran

Impact

mxcli fmt never modifies files and silently accepts garbage input — formatting workflow broken.

Issues

1. Output goes to stdout, file unchanged

./mxcli fmt file.mdl
# Formatted MDL printed to stdout; file.mdl unchanged on disk

2. Invalid input passes through without error

echo "this is not valid MDL" | ./mxcli fmt
# Exit code: 0, no error, garbage echoed back

Expected Behavior

  1. Write formatted output back to the file (or require a -w flag for in-place write).
  2. Exit 1 on unparseable input with a diagnostic message.

Severity

Low — workaround: redirect stdout manually.


Discovered during AI-assisted manual testing session (2026-04-29, mxcli v0.7.0-257-ga07e7e0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions