keep-starknet-strange / cairo-lint

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

Add `double_comparison` #9

Closed 0xLucqs closed 1 month ago

0xLucqs commented 2 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 2 months ago

Hi, can I take this one?

onlydustapp[bot] commented 2 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 2 months ago

Yes please do @renzobanegass