Skip to content

Fmt removes underscores from number literals #2574

Closed
@CodeSandwich

Description

@CodeSandwich

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 (01325bc 2022-08-03T00:04:34.894101923Z)

What command(s) is the bug in?

forge fmt

Operating System

Linux

Describe the bug

After running forge fmt all underscores are erased from number literals. E.g.

uint256 million = 1_000_000;

is formatted into

uint256 million = 1000000;

which degrades readability.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions