keep-starknet-strange / cairo-lint

A collection of lints to catch common mistakes and improve your Cairo code.
21 stars 35 forks source link

Add `assertions_on_constants` #81

Open 0xLucqs opened 2 months ago

0xLucqs commented 2 months ago

What it does

Checks for assert!(true) and assert!(false) calls.

Why is this bad?

Should probably be replaced by a panic!() or removed

Example

assert!(false)
assert!(true)
const B: bool = false;
assert!(B)
0xLucqs commented 2 months ago

Sure