~/bend-docscommunity

linter/lint.bend fails

raw source on the hub · import bend-lint-api@0.1.0.0/linter/lint.bend as Lint

What a rule sees. A rule file imports this file, and defines rule().

Design - The rules run in an ordinary Bend program that seam.ts writes from bend-lint.json, builds once and keeps. The C lane is the target; the JS lane must work too. - Bend's checker is TS for now: seam.ts makes each check's program of what Bend's parser and checker give, and answers the questions rules ask about its types, over local TCP (see Seam in cli.bend). When the checker is Bend, glue in Bend makes the same program, and the questions become calls. - A file is a tree of syntax nodes. A rule walks it, and reads what a node is from the node and the nodes above it. - Rules are pure, so they run in parallel. The runner answers every rule's questions of a round in one batch. - A check is read once and shared by every rule. Facts and declarations are collected only if a rule needs them. - A rule requests a fix as typed operations, and the linter plans them. Until Bend's checker is Bend, no fix is proven to keep the program: --fix-dangerously makes them all, and --fix makes none.

5 imports
import Base
import ../shared/lists.bend as Lists
import ../shared/names.bend as Names
import ../shared/strings.bend as Strings
import ../shared/tables.bend as Tables