The codebase currently employs unwrap() which leads to unclear error messages. Additionally, divisions in the code are not pre-validated, resulting in ambiguous errors. The CI's semgrep check uses an outdated or irrelevant rule set for the current version of Cairo.
Linked Issue: #427
New Behavior
Replaced unwrap() with expect() for more informative error messages. Added pre-checks for divisions to yield clearer error messages, specifying either the variable or function name involved. A revised semgrep rule set has been added to the .github directory, although CI integration is pending.
Breaking Changes
None
Additional Info
Next Steps: Update CI to use the new semgrep rules.
Pull Request Type
Current Behaviour
The codebase currently employs
unwrap()
which leads to unclear error messages. Additionally, divisions in the code are not pre-validated, resulting in ambiguous errors. The CI's semgrep check uses an outdated or irrelevant rule set for the current version of Cairo.Linked Issue: #427
New Behavior
Replaced
unwrap()
withexpect()
for more informative error messages. Added pre-checks for divisions to yield clearer error messages, specifying either the variable or function name involved. A revised semgrep rule set has been added to the.github
directory, although CI integration is pending.Breaking Changes
None
Additional Info
Next Steps: Update CI to use the new
semgrep
rules.