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 `if_same_then_else` #85

Open 0xLucqs opened 2 months ago

0xLucqs commented 2 months ago

What it does

Checks for if/else with the same body as the then part and the else part.

Why is this bad?

This is probably a copy & paste error.

Example

let foo = if … {
    42
} else {
    42
};
Gianfranco99 commented 2 months ago

Hello! I'd like to take this issue. I have a background in Cairo and I'm familiar with spotting these kinds of redundancy issues.

onlydustapp[bot] commented 2 months ago

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

fishonamos commented 2 months ago

Hi @0xLucqs . I will take this one as discussed.

onlydustapp[bot] commented 2 months ago

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