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 `erasing_op` #17

Closed 0xLucqs closed 2 months ago

0xLucqs commented 3 months ago

What it does

Checks for erasing operations, e.g., x * 0.

Why is this bad?

The whole expression can be replaced by zero. This is most likely not the intended outcome and should probably be corrected

Example

let x = 1;
0 / x;
0 * x;
x & 0;

https://rust-lang.github.io/rust-clippy/master/index.html#/erasing_op

CristopherAguilar10 commented 3 months ago

hello @0xLucqs can i work in this issue?

0xLucqs commented 3 months ago

sure and i can help if you're stuck or don't know how to start don't hesitate to ping me

CristopherAguilar10 commented 3 months ago

ok, thanks for the opportunity

guha-rahul commented 2 months ago

hey @0xLucqs , i think you can close this since its done.