angler

A pluggable linter for Carp source. Built on carpentry-org/carp-reader and carpentry-org/parsec.

Most users invoke angler as a CLI (angler FILE…). The library surface is documented here for plugin authors and programmatic consumers. See the documentation on writing rules.

(load "git@github.com:carpentry-org/angler@0.5.1")

(match (Lint.lint-source "(do x)")
  (Result.Success diags) (for [i 0 (Array.length &diags)]
                           (IO.println &(Diagnostic.str (Array.unsafe-nth &diags i))))
  (Result.Error e)       (IO.errorln &(Parser.format-error &e)))

Modules

Built-in rules

CLI

Suppressing findings

A ; angler-disable-next-line, ; angler-disable-line or ; angler-disable-file comment in the linted file switches rules off for the line below it, its own line, or the whole file. Each takes a space- or comma-separated list of rule names; none means every rule. Suppression applies to --fix as well as to reporting.