foundry-rs / foundry-rs/foundry

forge(fmt): option for Allman

Open
#13,334 3 comments 0 reactions 1 assignee Claimed by @Syzygy106 View on GitHub
C-forge Cmd-forge-fmt T-feature
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
18h 20m
Merged PRs (30d)
510

Description

### Component

Other (please describe)

### Describe the feature you would like

Currently, forge fmt requires using the K&R style for opening braces. Can you add support for the Allman style via a flag?

### Additional context

Currently `forge fmt --check` always throws:
```Diff in contracts\AssetVault.sol:
2 2 |
3 3 | import {ERC4626} from "@openzeppelin-contracts/token/ERC20/extensions/ERC4626.sol";
4 4 |
5 |-contract AssetVault is ERC4626
6 |-{
5 |+contract AssetVault is ERC4626 {
7 6 | constructor(address asset, string memory name, string memory symbol) ERC4626(asset, name, symbol) {}
8 7 | }

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.