Skip to content

forge fmt changes import formatting when it shouldn't #12726

@mudgen

Description

@mudgen

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.5.0-stable

What version of Foundryup are you on?

foundryup: 1.4.0

What command(s) is the bug in?

forge fmt

Operating System

Linux

Describe the bug

I want to use an import statement like this:

import * as Owner from "../../access/Owner/Owner.sol";

But forge fmt reformats it to this:

import "../../access/Owner/Owner.sol" as Owner;

I don't want that. What is the best way to prevent this? Or can this be changed or configured?

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bugType: bugT-needs-triageType: this issue needs to be labelled

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions