Skip to content

(num)

numeric literals

clojure
(num val?)

Where:

  1. val: numeric value or range to match *

Behavior

  • Supports range matching with inclusive bounds using the .. syntax.

Examples

Find magic numbers in timeout configurations.

clojure
(num 1000..5000)

Selects in lines { 1, 2 } but not in { 3 }:

python
TIMEOUT = 1000
RETRY = 5000
LONG_WAIT = 10000

Locate HTTP status codes in the 4xx range.

clojure
(num 400..499)

Selects in lines { 1 } but not in { 3 }:

python
if status == 404:
    pass
if status == 500:
    pass

Arguments

val

• Number • Numeric Range

Does NOT support: CompositionFree-form SelectionRefinementReplacement

Copyright © 2022-present Semantic Works, Inc.