hara.typed.xtalk-lint

+block-heads+

+extra-block-heads+

binding-pairs

(binding-pairs bindings)

block-head?

(block-head? head)

canonical-head

(canonical-head x)

diagnostic

(diagnostic code severity message form context opts extra)

flatten-dot-access

(flatten-dot-access form)

Flattens nested dot object access into one canonical dot form.

The trailing forms are retained as method arguments, so (. (. a ["name"]) ["hello"] (run 1 2 3)) becomes (. a ["name"] ["hello"] (run 1 2 3)).

form-pairs

(form-pairs h form block?)

function-body-forms

(function-body-forms form)

lint-file

(lint-file file-path)

lint-files

(lint-files file-paths)

lint-form

(lint-form form context opts)

lint-forms

(lint-forms forms)(lint-forms forms opts)

lint-pairs

(lint-pairs pairs opts)

lint-top-form

(lint-top-form form opts)

nested-dot-access?

(nested-dot-access? form)

simple-destructuring-source?

(simple-destructuring-source? form)

Returns true when a destructuring var source can be safely read directly.

Direct destructuring repeats the source once per bound field, so the source must be a symbol or a one-level dot access on a symbol.

source-location

(source-location form opts)

summarize

(summarize diagnostics)

var-merge-diagnostics

(var-merge-diagnostics forms opts)

Suggests merging adjacent same-object dot bindings into one destructuring var.

var-source-diagnostics

(var-source-diagnostics form context opts)

var-target-diagnostics

(var-target-diagnostics form context opts)