Rule
is a named, described lint rule. fn takes a Located
node and returns (Maybe Diagnostic). Most rules fire on at most one
node shape; if you need to emit several diagnostics per node, split
into multiple rules.
fn
(Fn [(Ref Rule a)] (Ref (Fn [(Ref Located b)] (Maybe Diagnostic)) a))
gets the fn property of a Rule.
init
(Fn [String, String, (Fn [(Ref Located a)] (Maybe Diagnostic))] Rule)
creates a Rule.
set-description!
(Fn [(Ref Rule a), String] ())
sets the description property of a Rule in place.
set-fn
(Fn [Rule, (Fn [(Ref Located a)] (Maybe Diagnostic))] Rule)
sets the fn property of a Rule.
set-fn!
(Fn [(Ref Rule a), (Fn [(Ref Located b)] (Maybe Diagnostic))] ())
sets the fn property of a Rule in place.
update-description
(Fn [Rule, (Ref (Fn [String] String a) b)] Rule)
updates the description property of a Rule using a function f.
update-fn
(Fn [Rule, (Ref (Fn [(Fn [(Ref Located a)] (Maybe Diagnostic))] (Fn [(Ref Located a)] (Maybe Diagnostic)) b) c)] Rule)
updates the fn property of a Rule using a function f.
update-name
(Fn [Rule, (Ref (Fn [String] String a) b)] Rule)
updates the name property of a Rule using a function f.