bend-lint-rules
Releases (5)
-
0.2.2.0 invalid
expected a package named bend-lint-api@0.2.2.0 on https://hub.bend-lang.com
26 files do not load
- language/decreasing_call.bend
- language/forward_reference.bend
- language/reused_binder.bend
- language/unneeded_plus.bend
- layout/canon_import_path.bend
- layout/case.bend
- layout/directive_order.bend
- layout/format.bend
- layout/imports.bend
- lib/linter/directives.bend
- lib/text/main.bend
- no_unused/imports.bend
- performance/append_in_loop.bend
- performance/bang_after_fork.bend
- performance/dead_accumulator.bend
- performance/deep_call_in_fork.bend
- performance/drop_in_bang.bend
- performance/eager_branch.bend
- performance/gpu_fit.bend
- performance/list_index_loop.bend
- performance/loop_invariant_call.bend
- performance/missed_fork.bend
- performance/repeated_call.bend
- performance/template_value_field.bend
- performance/unused_result.bend
- rules.bend
-
0.2.1.0 invalid
expected a package named bend-lint-api@0.2.1.0 on https://hub.bend-lang.com
26 files do not load
- language/decreasing_call.bend
- language/forward_reference.bend
- language/reused_binder.bend
- language/unneeded_plus.bend
- layout/canon_import_path.bend
- layout/case.bend
- layout/directive_order.bend
- layout/format.bend
- layout/imports.bend
- lib/linter/directives.bend
- lib/text/main.bend
- no_unused/imports.bend
- performance/append_in_loop.bend
- performance/bang_after_fork.bend
- performance/dead_accumulator.bend
- performance/deep_call_in_fork.bend
- performance/drop_in_bang.bend
- performance/eager_branch.bend
- performance/gpu_fit.bend
- performance/list_index_loop.bend
- performance/loop_invariant_call.bend
- performance/missed_fork.bend
- performance/repeated_call.bend
- performance/template_value_field.bend
- performance/unused_result.bend
- rules.bend
-
0.2.0.0 indexed
-
0.1.1.0 unindexed
-
0.1.0.0 unindexed
Definitions (801)
lib/linter/directives.bend
- def said
- def scanned
- def when
- def has_markWhether `text` has a directive's mark, "bend-lint:".
- def apply
lib/text/main.bend
- type EditThe text from `beg` to `end` in the file at `path`, replaced by `text`.
- def Edit.path
- def Edit.is_le
- def apply.go`rest`, the text from `at` on, with `edits` (in order) made, after the pieces of `out` (last first).
- def apply`text` with `edits` made.
- type SpansSpans that never touch (`Spans.touches`), by place: a balanced (AVL) tree, by start, then end; `height` counts its levels.
- def Spans.height
- def Spans.nodeThe node over `l` and `r`, whose heights differ by one at most.
- def Spans.lean_left.if
- def Spans.lean_leftThe node over `l` and `r`, where `l` is two levels higher: turned right, after its left turns left if its inner side is the higher.
- def Spans.lean_right.if
- def Spans.lean_rightThe node over `l` and `r`, where `r` is two levels higher: the mirror of `lean_left`.
- def Spans.balance.if
- def Spans.balanceThe node over `l` and `r`, balanced: their heights may differ by two.
- def Spans.cmp.of
- def Spans.cmpHow the span from `b` to `e` compares with the root's of `t`, by start, then end; GT past a leaf.
- def Spans.add`t` with the span from `b` to `e`; `side` is how it compares with the root's.
- def Spans.hasWhether `t` holds the span from `b` to `e`; `side` is how it compares with the root's.
- def Spans.starts_before
- def Spans.lastThe end of the last span of `t` (by start, then end) that starts before `e`, or `found`.
- def Spans.ends_after
- def Spans.touches.insertionWhether the span from `b` to `e` touches one of `t`: they share a character, or two insertions are at one place.
- def Spans.touches.of
- def Spans.touches
- type PositionA place in a text: its line and its column, from 1.
- type PlaceAn offset in the file at `path`.
- type PlacedAn offset to place, by its place among the offsets asked; and a place found, by the same.
- type Located
- type WalkThe offsets left to place, in offset order, and the places found, last first.
- def Placed.is_le
- def Located.is_le
- def Placed.of
- def Walk.is_due
- def Walk.emitThe offsets due at `at`, placed at `line` and `column`.
- def Walk.done
- def Walk.goThe offsets placed, one character of `text` at a time; offsets past its end are placed at its end.
- def Walk.positions
- def Walk.locateThe offsets of `sorted` (in offset order) placed in `text`, in no order.
- def positionsWhere each offset of `offsets` is in `text`, in order: one pass over the text, whatever the number of offsets.
- def Place.key
- def Place.atWhere the offset `offset` of the file at `path` is, among `places` (what `places` gives); 1:1 if it is not there.
- def places.groupThe requests by file, each offset numbered by itself, onto `groups`.
- def places.keepThe places found in the file at `path`, by key, onto `out`.
- def places.walkThe requests of each file of `paths` placed in its text, onto `out`; a file `texts` lacks places them at its start.
- def placesWhere each requested offset is, by key (read with `Place.at`): one pass over each file asked about, whatever the number of requests.
no_unused/imports.bend
performance/append_in_loop.bend
- type AppendA function that copies its first list or text to append to it.
- type LoopWhat judging the calls of a loop to itself reads: the loop's parameters, and the file's text.
- def Append.ofThe append that a call of `callee` with `count` arguments is.
- def Append.atWhich argument an append copies.
- def Append.messageWhat a finding says about an append of `acc` in the loop `loop`.
- def hasWhether a variable the file writes, of the binder `b`, is among `nodes` or under them, or `found`.
- def judged
- def accumulatedThe finding about an append (`a`, at `span`, with `args`) to `acc`, if it is a parameter of the loop `name` that its call does not also use (in `before` and `after`, its nodes but the append): then it keeps each value the loop builds, and the copies are needed.
- def appended
- def argumentThe findings about an argument of a call of the loop `name`, if it appends; `before` and `after` are the call's other nodes.
- def argumentsThe findings about the arguments `args` of a call of the loop `name`, after the call's nodes `before` (last first).
- def call.of
- def call
- def calls
- def visit
- def defs
- def run
- def rule
performance/bang_after_fork.bend
- type ProgramWhat judging a file's calls reads: the program's definitions, by the name the check gives them; those under which a parallel let runs (see GpuFit.program.under); and where the file writes `!(`.
- def messageFunctions =========
- def host.visitThe definition an application below `path` calls by name on the host: not with `!`, as a `!` call runs on the GPU, and a `!` call after it stays there.
- def forksWhether `nodes` fork on the host when they run: a call among them or under them, made without `!`, is of a definition under which a parallel let runs.
- def let.valuesThe nodes of a let (`kids`) that run before the rest of its block, its last node: its binders and values.
- def let.forksWhether the let of `kids` forks before the rest of its block, if the node is in it (`last`): it is a parallel let (`parallel`), or a value of it forks.
- def afterWhether a fork runs before the node below `path`, in the same evaluation, or `found`: a let above it, whose rest of block it is in, forks (a parallel let, or a value that forks), and no lambda (the rest of an IO step) comes between.
- def after.ifWhether a fork runs before a call with `args` below `path`, in the same evaluation, if it is `asked`: an argument forks, or a let above it does.
- def visitThe finding about an application below `path`, if it is a `!` call of a definition that forks, made after a fork.
- def scannedThe findings in the file of `here`, which writes `!(` where `bangs` say: none, if it writes none.
- def run
- def rule
performance/dead_accumulator.bend
- type OwnerWhat judging the uses of one parameter reads: its loop's name (as the check names it), the place of the parameter among the loop's parameters (as a call's arguments are), and its binder.
- def messageFunctions =========
- def kindHow a use of the parameter below `path` ends: 0 if it is read (in anything but the loop's call of itself, at the parameter's place), 1 if it is passed there as it is, 2 if it is passed there with something added (`grown`).
- def use.visitHow the parameter is used at a node, below `path`, if the node is a use of it in live code.
- def is_deadWhether a parameter of quantity `q` that is used as `kinds` says is a dead accumulator: it is there at run time, it is only passed to the loop's own calls, and grows in one at least.
- def paramsThe findings about the parameters among `nodes`, a definition's, onto `out`; `at` is the place of the first.
- def defs
- def run
- def rule
performance/deep_call_in_fork.bend
- type OwnerWhat judging the calls in one definition reads: the definitions of the file that call themselves outside a tail position (as the check names them), and the definition, by the name the check gives it and as written.
- def is_lastWhether `at` is the place of the last of `nodes`.
- def is_tailWhether the node below `path` is in a tail position, if it ends the node above it (`ends`): the body of a definition or a case, or the rest of a block after its lets, through annotations.
- def deep.ofWhether a call of its definition to itself below `path` is outside a tail position.
- def deep.visit
- def deep.ifWhether a definition with the nodes `k` counts, if it calls itself outside a tail position (`found`): each does if `forking`, else one without a parallel let.