slippy-cli 0.1.0

AI Linter for Rust projects
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
warning: Unnecessary `contains_key` call on a collection being iterated over
  ╭▸ examples/lints/unnecessary_contains_in_loop/map.rs:6:16
  │
6 │         if map.contains_key(k) {
  │                ━━━━━━━━━━━━━━━ method always returns `true` unless modified while iterating
  │
  ╰ help: for further information visit https://sliman4.github.io/slippy/index.html#unnecessary_contains_in_loop
note: the collection is iterated here
  ╭▸ examples/lints/unnecessary_contains_in_loop/map.rs:5:5
  │
5 │     for k in map.keys() {
  ╰╴    ━━━━━━━━━━━━━━━━━━━ iterating over this collection
help: try:
  ╭╴
6 -         if map.contains_key(k) {
6 +         if true {
  ╰╴
note: `warn(slippy::unnecessary_contains_in_loop)` on by default