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)
performance/loop_invariant_call.bend
- def branchThe branch a node below `path` is in: the innermost case above it, or the definition's body (the last of `path`).
- def repeats
- def repeats.ifWhether the branch a node below `path` is in calls `target` again, if `found`.
- def visit
- def is_proofWhether a definition's nodes say it is a proof: it has no return type written (it fills a law), or it returns an equality.
- def defs.ifThe findings in the definition `owner`, unless it is `skipped`.
- def defs
- def run
- def rule
performance/missed_fork.bend
- type OwnerWhat judging one definition reads: its name as the check names it and as written, whether it returns IO (its calls build effects, they do not run them), and the file's text.
- type BoundA let that binds one name to a call of its definition to itself: where its binder starts, the binder as written, the binder, and the call.
- type RunThe lets of a run so far (last first), their binders, and the findings so far (last first).
- def trim.goFunctions =========
- def trimmed
- def is_choiceWhether an application's nodes call Bool.pick, Bool.and or Bool.or: its arguments are alternatives, each an expression of its own.
- def is_boundaryWhether a node of this syntax ends the expression a call is in.
- def returns_ioWhether a definition's nodes say it returns IO, as written.
- def calls.toWhether an application's nodes call `target`: its function is a reference to it.
- def called.at`out` with the span of a call of `target` (if `call`), where the call is.
- def callsWhere the calls of `target` among `nodes` and under them are (onto `out`, last first), in the expression they start: a node that ends it starts another, and so does each argument of a choice (Bool.pick, Bool.and, Bool.or); a call inside another call of `target` does not count: none does if `nodes` are the parts of one, or of a choice (`inside`).
- def texts
- def names
- def bindersFresh names for `n` values, as a parallel let binds them.
- def quoted
- def costs
- def expected
- def count
- def Call.message
- def alike.goThe finding about an expression at `span` that holds the calls at `spans` (last first), if they are two or more.
- def is_alikeWhether `texts`, the calls of one finding, are all written the same way.
- def Call.finding.of
- def Call.finding
- def startsWhether the node below `path` starts an expression: the node above it ends one, or is a choice.
- def calledThe call of a let's value, if the value is a call of `target`, typed or not.
- def boundA let that binds one name to a call of `target`, if `node` is one.
- def usesWhether a variable the file writes, of one of `binders`, is among `nodes` or under them, or `found`.
- def Bound.texts
- def Run.lets
- def Run.message
- def Run.alikeWhether the calls of a run of lets are all written the same way.
- def Bound.from
- def Run.findingThe finding about a run of lets (last first), if it has two lets or more: from the first's binder to the last's call.
- def Run.addThe run after a let (`bound`, if it is one): the let joins it if its call uses no binder of the run; else the run ends, and the let starts the next.
- def Run.finding.end
- def chainThe findings about the runs of lets that follow each other from `node`, a let, after `run`: each next let is the rest of block of the one before, while its call uses no binder of the run.
- def followsWhether a let below `path` goes on a run from the let above it: it is that let's rest of block, and that let binds one name to a call.
- def rootsThe finding about the calls of the expression a node starts, if it starts one (`root`).
- def letsThe findings about the runs of lets from a node, if it starts one (`head`).
- def visitThe findings at a node of a definition below `path`: about the calls of the expression it starts, and about the runs of lets from it, if it starts one.
- def defs
- def run
- def rule
performance/repeated_call.bend
- type CallA call of a definition that loops: the definition (as the check names it, and as written), its arguments, where it is written, and where its branch starts (0 for a definition's body).
- type ScopeWhat finding the calls of one definition reads: what performance/loop_invariant_call reads to judge them, with the definitions of the file that call themselves (as the check names them), and the program's definitions, by the name the check gives them.
- def Call.targetFunctions =========
- def Call.callee
- def Call.args
- def Call.span
- def Call.branch
- def message
- def is_guardedWhether a node below `path` may not run on the path of its branch, or runs as a copy made on purpose: under a lambda, a value of a choice (Bool.pick, Bool.and, Bool.or), or a value of a parallel let.
- def first_begWhere the first of `nodes`, or a node under it, that has a place starts.
- def branch.atWhere a branch starts (a case has no place of its own: its first node with one), or 0 for a definition's body.
- def returns_numberWhether a definition of the program says it returns a number.
- def is_keptWhether a call that counts so far (if `ok`) still counts: not if performance/loop_invariant_call reports it.
- def visitThe call of a definition that loops at an application below `path`, if it counts.
- def is_shallowWhether two nodes, as written, are the same at their top: the same variable, literal or reference, or the same kind of application, annotation or construction (their nodes below are compared next).
- def is_sameWhether `xs` and `ys` are written the same way, node by node and below (if `ok`); `fuel` bounds the nodes compared.
- def repeatsWhether `c` repeats a call of `seen`: the same definition, in the same branch, with arguments written the same way.
- def judgedThe findings about the calls of one definition (`loop`, as written) that repeat an earlier one, onto `out`.
- def calls.ofThe calls of a definition (`node`) that count, unless it is a proof.
- def defs
- def run
- def rule
performance/template_value_field.bend
- type OwnerWhat judging the uses of one definition's templates reads: the binders of its templates whose type is a record of functions, and its name as written.
- def messageFunctions =========
- def records.step
- def recordsThe datatypes among `nodes` with a field whose written type is a function, by the name the check gives them, onto `out`.
- def program.records
- def writtenThe datatype a type's nodes write, by the name the check gives it, or "" for another form (a function, a sort).
- def templatesThe binders of the templates among a definition's nodes whose type is one of `records`, onto `out`.
- def is_lambda
- def is_builtWhether a node below `path` is computed when a record of functions is built: under no lambda, and in a construction with a lambda among its fields (`found`, once one is).
- def visit
- def defsThe findings in the definitions among `nodes` that have templates of `records`, onto `out` (last first).
- def run
- def rule
performance/unused_result.bend
- type UnusedA binder a loop never uses: where it is written, its name, the loop's name, and the type the checker gave it.
- type OwnerWhat judging the binders of one definition reads: whether it is a loop (it calls itself), and its name as written.
- def messageFunctions =========
- def loop.visit
- def is_stepWhether a lambda below `path` is the rest of a step of a `do` block (`x : T <- m`, the last argument of a call of a bind): its value comes from the monad, which makes it whether it is used or not.
- def is_binderWhether a node of this kind, below `path`, binds a value at run time: a lambda's parameter (not a `do` step's), or a let's name (a binding, or the one pattern variable of a let), not erased.
- def unusedThe type of a binder its facts say is never used, if they do.
- def unused.of
- def visit
- def defsThe binders that the loops among `nodes` never use, onto `out` (last first).
- def types
- def judgedThe findings about the unused binders whose types, as shown, are data: not numbers, nor records of numbers only.
- def run