keep-starknet-strange / cairo-lint

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

Add `double_parens` #10

Open 0xLucqs opened 1 month ago

0xLucqs commented 1 month ago

What it does

Checks for unnecessary double parentheses.

Why is this bad?

This makes code harder to read and might indicate a mistake.

Example

fn simple_double_parens() -> i32 {
   ((0))
}

foo((0));

Use instead:

fn simple_no_parens() -> i32 {
   0
}

foo(0);

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

coxmars commented 1 month ago

Hi @0xLucqs can I help you with this one? 🫡

0xLucqs commented 1 month ago

sure can you join the telegram group as well so i can help if you're stuck or don't know how to start ? https://t.me/cairolint

coxmars commented 1 month ago

sure can you join the telegram group as well so i can help if you're stuck or don't know how to start ? https://t.me/cairolint

Sure thanks, I will work in this asap and I will let you know if I have issues 🫡