foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.25k stars 1.73k forks source link

feat: support external sections in `foundry.toml` #5866

Open mds1 opened 1 year ago

mds1 commented 1 year ago

Component

Forge

Describe the feature you would like

There are various requests and use cases for adding support for custom sections to foundry.toml:

Currently, you can add a custom section to the config file, but it will trigger a warning:

$ forge test
warning: Unknown section [scopelint] found in foundry.toml. This notation for profiles has been deprecated and may result in the profile not being registered in future versions. Please use [profile.scopelint] instead or run `forge config --fix`.

Therefore, I'd suggest requiring that unknown sections are prefixed with something like external., which makes it clear they are for other tools that extend foundry and we'd suppress the warning for those sections.

For example:

# Default foundry configuration
[profile.default]
optimizer = false

[profile.ci]
optimizer = true

# Custom sections for other tools
[external.scopelint]
some_flag = 1

[external.forge_deploy]
another_setting = 123

Additional context

No response

re1ro commented 1 year ago

Upvote 💯