vtcode 0.123.7

A Rust-based terminal coding agent with modular architecture supporting multiple LLM providers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
id: prefer-symbol-over-proc
language: Ruby
severity: info
message: Prefer `&:method` shorthand over verbose block
note: |
  Ruby's symbol-to-proc shorthand `&:method` is more concise than
  `{ |v| v.method }` for single-method calls on the block parameter.
  This rule targets `map`, `select`, `reject`, `each`, `find_all`,
  `detect`, `any?`, `all?`, `none?`, and `count`.
rule:
  pattern: $LIST.$ITER { |$V| $V.$METHOD }
constraints:
  ITER:
    regex: ^(map|select|reject|each|find_all|detect|any\?|all\?|none\?|count)$
fix: $LIST.$ITER(&:$METHOD)
files:
  - '**/*.rb'