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.

copy

instantiate

(Fn [(Ref Rule a)] Rule)

copies a Rule.

delete

instantiate

(Fn [Rule] ())

deletes a Rule. Should usually not be called manually.

description

instantiate

(Fn [(Ref Rule a)] (Ref String a))

gets the description property of a Rule.

fn

instantiate

(Fn [(Ref Rule a)] (Ref (Fn [(Ref Located b)] (Maybe Diagnostic)) a))

gets the fn property of a Rule.

init

instantiate

(Fn [String, String, (Fn [(Ref Located a)] (Maybe Diagnostic))] Rule)

creates a Rule.

name

instantiate

(Fn [(Ref Rule a)] (Ref String a))

gets the name property of a Rule.

prn

instantiate

(Fn [(Ref Rule a)] String)

converts a Rule to a string.

set-description

instantiate

(Fn [Rule, String] Rule)

sets the description property of a Rule.

set-description!

instantiate

(Fn [(Ref Rule a), String] ())

sets the description property of a Rule in place.

set-fn

instantiate

(Fn [Rule, (Fn [(Ref Located a)] (Maybe Diagnostic))] Rule)

sets the fn property of a Rule.

set-fn!

instantiate

(Fn [(Ref Rule a), (Fn [(Ref Located b)] (Maybe Diagnostic))] ())

sets the fn property of a Rule in place.

set-name

instantiate

(Fn [Rule, String] Rule)

sets the name property of a Rule.

set-name!

instantiate

(Fn [(Ref Rule a), String] ())

sets the name property of a Rule in place.

str

instantiate

(Fn [(Ref Rule a)] String)

converts a Rule to a string.

update-description

instantiate

(Fn [Rule, (Ref (Fn [String] String a) b)] Rule)

updates the description property of a Rule using a function f.

update-fn

instantiate

(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

instantiate

(Fn [Rule, (Ref (Fn [String] String a) b)] Rule)

updates the name property of a Rule using a function f.