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

Add option to treat solc warnings as errors #3476

Closed
KholdStare opened this issue Oct 11, 2022 · 5 comments
Closed

Add option to treat solc warnings as errors #3476

KholdStare opened this issue Oct 11, 2022 · 5 comments
Labels
D-easy Difficulty: easy first issue A good way to start contributing T-feature Type: feature

Comments

@KholdStare
Copy link
Contributor

KholdStare commented Oct 11, 2022

Component

Forge

Describe the feature you would like

When running forge build or any other command that invokes the solc compiler, have an option to treat its warnings as errors.

I tried looking for such a feature in solc itself, but such a proposal was rejected by the maintainers here: ethereum/solidity#10277 . They ask "framework" maintainers to treat solc warnings as errors if required.

Additional context

There is something like this in the hardhat ecosystem: https://github.com/frangio/hardhat-ignore-warnings . Allows to turn certain warnings into errors, or to ignore others.

@KholdStare KholdStare added the T-feature Type: feature label Oct 11, 2022
@gakonst gakonst added this to Foundry Oct 11, 2022
@gakonst gakonst moved this to Todo in Foundry Oct 11, 2022
@mattsse
Copy link
Member

mattsse commented Oct 11, 2022

this is definitely something that can be added easily

@mattsse mattsse added first issue A good way to start contributing D-easy Difficulty: easy labels Oct 11, 2022
@gakonst
Copy link
Member

gakonst commented Oct 11, 2022

Simple matter of switching https://github.com/gakonst/ethers-rs/blob/5c762c44d760ed9dad3900be079062174ada0245/ethers-solc/src/compile/output/mod.rs#L430 to not filter for errors if it's set to treat warning as errors

@ghost
Copy link

ghost commented Nov 8, 2022

Hello @KholdStare, is this okay if I pick this up? :) Want to start submitting here

@KholdStare
Copy link
Contributor Author

@timofeli Of course! Thank you.

@zerosnacks
Copy link
Member

@jenpaff jenpaff moved this from Todo to Completed in Foundry Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-easy Difficulty: easy first issue A good way to start contributing T-feature Type: feature
Projects
Archived in project
Development

No branches or pull requests

4 participants