~/bend-docscommunity

graph/fan_in.bend relies on unsafe/foreign

raw source on the hub · import bend-lint-pack@0.1.1.0/graph/fan_in.bend as Fan_in

graph/fan_in: warn when more than max different defs of the program use one def (default 20).

Fan-in is a def's weight: every caller depends on its contract, so a change to it spreads. Counted: the different defs, in the linted file and the files it imports, that reference the def (in their bodies or types). Not counted: itself, laws and their proofs (specs, not callers), Base, hub packages. By default only the linted file's own defs are reported (imports reports every local file of the program). Lint the entry file so that callers in imported files are seen. Options: max (default 20), imports (default false).

3 imports
import Base
import ../vendor/lint.bend as Lint
import ../common.bend as Common

Definitions

def id source · line 13 · raw

String

def facts source · line 16 · raw

0x7294c9a1db4be6346e88202032984e02/vendor/lint.Want

def message source · line 19 · raw

@+name:String -> @d:U32 -> @max:U32 -> String

def judge.one source · line 22 · raw

@+d:U32 -> @+max:U32 -> @+owner:String -> @span:Maybe<&2, 0x7294c9a1db4be6346e88202032984e02/vendor/lint.Span> -> List<&2, 0x7294c9a1db4be6346e88202032984e02/vendor/lint.Diag>

def judge source · line 28 · raw

@seen:List<&2, 0x7294c9a1db4be6346e88202032984e02/common.Seen> -> @+max:U32 -> @+nodes:Set -> @+into:Map<&2, List<&2, String>> -> @out:List<&2, 0x7294c9a1db4be6346e88202032984e02/vendor/lint.Diag> -> List<&2, 0x7294c9a1db4be6346e88202032984e02/vendor/lint.Diag>

def verdict source · line 50 · raw

@p:0x7294c9a1db4be6346e88202032984e02/common.Prog -> @max:U32 -> @scope:0x7294c9a1db4be6346e88202032984e02/common.Scope -> List<&2, 0x7294c9a1db4be6346e88202032984e02/vendor/lint.Diag>

def run source · line 55 · raw

@input:0x7294c9a1db4be6346e88202032984e02/vendor/lint.Input -> IO(List<&2, 0x7294c9a1db4be6346e88202032984e02/vendor/lint.Diag>)

def main source · line 63 · raw

IO(Unit)