KaiserKarel / substrace

Static analysis for Substrate based projects
27 stars 1 forks source link

Implementing enable_singlepass_benchmarks lint #25

Closed TheCodingWombat closed 1 year ago

TheCodingWombat commented 1 year ago

Implementing enable_singlepass_benchmarks lint using ripgrep. Catches patterns like #[cfg(feature="runtime-benchmarks")] #[cfg(any(feature="runtime-benchmarks", other_stuff="other_stuff"))] and suggests to also compile during test.

Includes tests.

Does not include auto-fix.

Closes #11

TheCodingWombat commented 1 year ago

Problem: Current suggestions overwrite other cfg attributes with test attribute.

TheCodingWombat commented 1 year ago

Problem fixed.