Open 0xLucqs opened 3 weeks ago
Checks for nested if statements which can be collapsed by &&-combining their conditions.
Each if-statement adds one level of nesting, which makes code look more complex than it really is.
if x { if y { // … } }
Use instead:
if x && y { // … }
gm @0xLucqs I could help with this issue
Hey @jimenezz22! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
What it does
Checks for nested if statements which can be collapsed by &&-combining their conditions.
Why is this bad?
Each if-statement adds one level of nesting, which makes code look more complex than it really is.
Example
Use instead: