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 `double_comparison` #9

Closed 0xLucqs closed 3 months ago

0xLucqs commented 3 months ago

What it does

Checks for double comparisons that could be simplified to a single expression.

Why is this bad?

Readability.

Example

if x == y || x < y {}

Use instead:

if x <= y {}

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

renzobanegass commented 3 months ago

Hi, can I take this one?

onlydustapp[bot] commented 3 months ago

Hey @renzobanegass! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!

0xLucqs commented 3 months ago

Yes please do @renzobanegass