Skip to content

dart format should exit non-zero if the source code has errors #1035

@natebosch

Description

@natebosch

echo 'not dart' | dartfmt and echo 'not dart' | dart format both produce equivalent error messages, but dartfmt exits with code 65 while dart format exits with 0.

We use the exit code in dart-vim-plugin to know whether the output should be treated as the formatted file, or as errors. Unfortunately in vim it isn't trivial to distinguish between stderr and stdout so using the output stream to determine success would take some additional hacking and running the command twice.

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