Skip to content

Feature request: support formatter options like goimports local prefix #1098

@martbock

Description

@martbock

I'm currently upgrading a project to mockery v3 and am setting up a config from scratch. We're using goimports with the local prefix option to separate public modules from private ones in our imports. So now I need to wrap a mockery call in a make command to always run goimports with the local prefix option afterwards. It's not a huge deal, but I'd love to be able to set the local prefix option when configuring mockery to use goimports directly.

I'd be happy to contribute an implementation proposal, but I wanted to clarify if you would even consider adding formatter options to the mockery config.

In terms of configuration structure, I think something like this could make sense:

...
formatter: goimports
formatter-options:
  goimports:
    local-prefix: example.com/my-org

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedFeature request approved for development

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions