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 `enum_variant_names` #14

Open 0xLucqs opened 1 month ago

0xLucqs commented 1 month ago

What it does

Detects enumeration variants that are prefixed or suffixed by the same characters.

Why is this bad?

Enumeration variant names should specify their variant, not repeat the enumeration name.

Example

enum Cake {
   BlackForestCake,
   HummingbirdCake,
   BattenbergCake,
}

Use instead:

enum Cake {
   BlackForest,
   Hummingbird,
   Battenberg,
}

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

Ayoazeez26 commented 1 month ago

Hi @0xLucqs can I work on this?

0xLucqs commented 1 month ago

yes and please open a PR ASAP so i can track where you are and can help you more easily

bloomingpeach commented 22 hours ago

Can I work on this issue? @0xLucqs