Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support external sections in foundry.toml #5866

Open
mds1 opened this issue Sep 20, 2023 · 1 comment
Open

feat: support external sections in foundry.toml #5866

mds1 opened this issue Sep 20, 2023 · 1 comment
Labels
A-config Area: config A-extensions Area: extensions T-feature Type: feature

Comments

@mds1
Copy link
Collaborator

mds1 commented Sep 20, 2023

Component

Forge

Describe the feature you would like

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

  • scopelint is a tool for linting forge projects. Instead of having it's own config file, it would be nice to just let users define the settings directly in the forge config file
  • In feat (cheatcode) TOML support #4808, there's requests to support parsing the config file so it can be extended to contain settings for forge deploy or Noir circuits

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
Copy link

re1ro commented Sep 21, 2023

Upvote 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config Area: config A-extensions Area: extensions T-feature Type: feature
Projects
Archived in project
Development

No branches or pull requests

4 participants