Skip to content

Bad command line error on mistyped compiler flags #5181

Open
@dankeyy

Description

@dankeyy
roc fmt ~/testing/cli_test.roc
error: Found argument '/home/dankey/testing/cli_test.roc' which wasn't expected, or isn't valid in this context

USAGE:
    roc [OPTIONS] [ROC_FILE] [-- <ARGS_FOR_APP>...] [SUBCOMMAND]

For more information try --help

Instead it should say the second argument is malformed

Or to go the extra mile, do a flag suggestion by similar words bank
I had an idea to not even exit on bad keyword, rather

error: Found unexpected flag `fmt`. Perhaps you meant `format`.

Proceed with command `roc format cli_test.roc` [Y/n]? _
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliRelates to roc cli toolingenhancementNew feature or requesterror-messagesRelated to the quality of error messagesformattingRelates to the roc formatter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions