Skip to content

bug(fmt): bad block comment formatting and formatter rules ignored #12076

@Solthodox

Description

@Solthodox

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

v1.4.0-rc3

What version of Foundryup are you on?

Latest

What command(s) is the bug in?

forge fmt

Operating System

None

Describe the bug

The formatting is not exactly as is used to be with former forge fmt as it breaks some custom commets formatting. In my case im using some of the code from solady:

For example in Initializable contract:

BEFORE :

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       CUSTOM ERRORS                        */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

AFTER :

    /* ´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /* CUSTOM ERRORS */
    /* .•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

Also the commented custom formatter rules are not detected by this new formatter such as :
// forgefmt: disable-start and similars

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions