Header menu logo TestPrune

DeadCode Module

Types

Type Description

DeadCodeResult

Result of dead code analysis containing total, reachable, and unreachable symbol counts.

UnreachabilityReason

UnreachableSymbolInfo

VerboseDeadCodeResult

Functions and values

Function or value Description

findDeadCode allSymbols reachable testMethodNames includeTests

Full Usage: findDeadCode allSymbols reachable testMethodNames includeTests

Parameters:
    allSymbols : SymbolInfo list
    reachable : Set<string>
    testMethodNames : Set<string>
    includeTests : bool

Returns: DeadCodeResult * AnalysisEvent list

Find symbols that are not reachable from the given entry point patterns.

allSymbols : SymbolInfo list
reachable : Set<string>
testMethodNames : Set<string>
includeTests : bool
Returns: DeadCodeResult * AnalysisEvent list

findDeadCodeVerbose allSymbols reachable testMethodNames includeTests getIncomingEdgesBatch

Full Usage: findDeadCodeVerbose allSymbols reachable testMethodNames includeTests getIncomingEdgesBatch

Parameters:
    allSymbols : SymbolInfo list
    reachable : Set<string>
    testMethodNames : Set<string>
    includeTests : bool
    getIncomingEdgesBatch : string list -> Map<string, string list>

Returns: VerboseDeadCodeResult * AnalysisEvent list

Find dead code with verbose reasons for why each symbol is unreachable.

allSymbols : SymbolInfo list
reachable : Set<string>
testMethodNames : Set<string>
includeTests : bool
getIncomingEdgesBatch : string list -> Map<string, string list>
Returns: VerboseDeadCodeResult * AnalysisEvent list

findEntryPoints allNames entryPointPatterns

Full Usage: findEntryPoints allNames entryPointPatterns

Parameters:
    allNames : Set<string>
    entryPointPatterns : string list

Returns: string list

Match entry point patterns against all symbol names and return the matching names.

allNames : Set<string>
entryPointPatterns : string list
Returns: string list

Type something to start searching.