~/bend-docscommunity

no_unused/imports.bend checks

raw source on the hub · import bend-lint-rules@0.3.7.0/no_unused/imports.bend as Imports

no_unused/imports: an import that nothing in its file uses. Fix: deletes the import's line. Heuristics: a use is a name written through the import's alias, or, for Base, a name that only Base declares (Imported in the rule API). An import of an impl.bend whose file also imports the spec.bend beside it is used: it fills the spec's laws, which the file uses through the spec's names (see the experimental-bend-spec skill).

4 imports
import Base
import bend-lint-api@0.3.7.0/linter/api/impl.bend as LintImpl
import bend-lint-api@0.3.7.0/linter/api/spec.bend as Lint
import bend-lint-api@0.3.7.0/shared.bend as Shared

Definitions

def deleted source · line 12 · raw

@+text:String -> @path:String -> @at:U32 -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Fix>

The fix that deletes the import's line.

def stem source · line 22 · raw

@+target:String -> String

An import's target without .bend, if the check names it so.

def targets source · line 31 · raw

@declarations:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration> -> @out:List<&2, String> -> List<&2, String>

The targets of the imports among declarations, without .bend, onto out.

def has source · line 41 · raw

@targets:List<&2, String> -> @+x:String -> @found:Bool -> Bool

Whether x is one of targets, or found.

def links.if source · line 50 · raw

@impl:Bool -> @+s:String -> @targets:List<&2, String> -> Bool

def reported source · line 63 · raw

@linked:Bool -> @text:String -> @+path:String -> @+beg:U32 -> @end:U32 -> @name:String -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Finding>

def unused source · line 84 · raw

@text:String -> @targets:List<&2, String> -> @d:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Finding>

def findings source · line 94 · raw

@declarations:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Declaration> -> @+text:String -> @+targets:List<&2, String> -> @out:List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Finding> -> List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Finding>

def run source · line 111 · raw

@+here:0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Here -> 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Ask(List<&2, 0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Finding>)

def rule source · line 115 · raw

0x534e77ab9e7d8d3c817c84cab8139f38/linter/api/spec.Rule