Skip to content

bug: forge fmt bad indentation #7549

@cruzdanilo

Description

@cruzdanilo

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (f625d0f 2024-04-02T00:16:42.810315000Z)

What command(s) is the bug in?

forge fmt

Operating System

macOS (Apple Silicon)

Describe the bug

forge fmt fails to properly indent closing parenthesis enclosed in { }. example of formatted output:

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.25;

contract Example {
    function one() external {
        this.other({
            data: abi.encodeCall(
                this.other, ("bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla")
                )
        });
    }

    function other(bytes memory data) external {}
}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions