rb/num
numeric literals
clojure
(num val?)Where:
- val: numeric value to match *
Behavior
- Matches integer literals only; floats are not matched.
Examples
Find magic numbers in timeout configurations.
clojure
(num 1000..5000)Selects in lines { 1, 2 } but not in { 3 }:
ruby
TIMEOUT = 1000
RETRY = 5000
LONG_WAIT = 10000Locate HTTP status codes in the 4xx range.
clojure
(num 400..499)Selects in lines { 1 } but not in { 4 }:
ruby
if status == 404
warn "not found"
end
if status == 500
warn "error"
endArguments
val
• Number • Numeric Range
Does NOT support: Composition — Free-form Selection — Refinement — Replacement