~/bend-docscommunity

graph/fan_out.bend relies on unsafe/foreign

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

graph/fan_out: warn when a def uses more than max different defs of the program (default 10).

Fan-out is a def's coupling: each def it calls or names in a type is something it breaks with. Counted: the different defs, in the linted file and the files it imports, that the def references (in its body or its types). Not counted: itself, Base, hub packages, types, constructors, laws. 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 defs in imported files are seen. Options: max (default 10), 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 -> @+edges: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)