Skip to content

Show external fourmolu errors in notification #4853

@brandonchinn178

Description

@brandonchinn178

If I try to format a file with an error (e.g. invalid syntax), using the built-in fourmolu plugin shows the error message in the notification, but using an external fourmolu simply shows "fourmolu: Internal Error: Fourmolu failed with exit code 3" in the notification, and you have to open the HLS logs to see the stderr

Seems specific to fourmolu:

logWith recorder Info $ StdErr err
throwError $ PluginInternalError $ "Fourmolu failed with exit code " <> T.pack (show n)

Perhaps we should put stderr in the InternalError? I think that would match the bundled fourmolu logic. cc @georgefst

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: formatterstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions