assert_on_const
Default: Enabled
What it does
Checks for assertions on boolean literals, constants and expressions which are simplified to constants by the compiler.
Example
cairo
fn main() {
// Bool consts:
const C: bool = true;
assert!(C); // Always passes
// Bool literals:
assert!(true); // Always passes
assert!(false); // Never passes
// Bool expressions:
assert!(true && false); // Never passes
assert!((1 == 1) || (2 == 2)); // Always passes
}