Add --allow-warnings flag to treat certain errors as warnings#481
Add --allow-warnings flag to treat certain errors as warnings#481
--allow-warnings flag to treat certain errors as warnings#481Conversation
|
Just to be sure I understand properly; this PR makes the unused variable error as a warning, but by default warnings are treated like an error. Then there is the allow-warning flag to be able to compile with warning? |
|
That is correct - this PR is also the same as @vezenovm's with just the flag name changed and merge conflicts with master fixed |
|
I'd also be open to changing the flag name if you have a clearer suggestion |
allow-warnings for allowing warnings seems like a good name to me! |
* specify matching ssubcommand for verify and build * cargo fmt
|
I kind of like the flag |
guipublic
left a comment
There was a problem hiding this comment.
Good to have this, finally!
* master: Array sort (noir-lang#477) Add `--allow-warnings` flag to treat certain errors as warnings (noir-lang#481) Improve field comparison error message (noir-lang#499) Disable debug output during integration tests (noir-lang#494) Aligns build to (noir-lang#443) Refactor stdlib into a separate noir library (noir-lang#496)
Related issue(s)
Relates to "Change unused variables to warnings" #263.
Description
This PR has the same effect as #263 but puts this behavior behind a compile flag
--allow-warnings. The "allow-warnings" flag was chosen instead of a more specific flag relating to unused variables because of the implementation in the Diagnostics reporter which simply changes all Warnings to errors if the flag is not set.Thanks to @vezenovm for adding the flag to #263. This is created as a new PR on a new branch since I opted to start over and cherry-pick + manually apply changes instead of fixing 12k+ lines of conflicts with master.
Test additions / changes
(If applicable.)
Checklist
cargo fmtwith default settings.Additional Information
This PR is only a draft right now due to a bug with the verify command not finding the
allow-warningsflag. Theargs.is_present("allow-warnings")returns false for some reason.