Tempoarily treating warnings as errors

Is it possible to run rescript build and temporarily treat all warnings as errors? I’d like to develop while treating warnings as usual, then have an on commit githook check for any warnings before allowing me to commit.

Eslint has a flat (--max-warnings) that allows roughly this functionality.

Has anyone tried anything like this? Any ideas how it could be made to work?

There isn’t. I develop with normal warnings, and in CI where I want to enforce warnings as errors I use sed to rewrite bsconfig.json.

s/"error": false/"error": true/