/** * graph:no-side-effect-path — flag functions that are pure-by-design * AND whose return value is discarded by at least one caller, i.e. * functions whose computation has no observable effect on the program. * * Heuristic, in order: * 1. The function's entire transitive callee set is side-effect free * (no I/O, logging, or mutation), AND the candidate's own call edges are * all resolved. Unresolved edges are gated on the DIRECT occurrence only * (see isPureCandidate): an unresolved edge deep in the transitive set is * tolerated, because real code reaches library/builtin calls the catalog * cannot resolve, so disqualifying on any transitive unresolved edge would * suppress nearly every candidate. * 2. At least one inbound caller invokes this function as an * ExpressionStatement (its return value is discarded). * * Step 2 is what makes the signal actionable. A pure function that * returns data is a feature when its return value is consumed * (`const x = pureHelper(...)`); it is dead code when the value is * thrown away (`pureHelper(...);` as a standalone statement). * * Catalogs from older runs that lack the `discarded` field on call * edges fall back to the legacy "any pure callee" check. * * Side-effect primitives are language-specific. The active adapter * supplies `ruleHints.sideEffectPrimitives` (e.g. `print`, `os.system` * for Python; `println!`, `panic!` for Rust). When the hint is * absent — older adapters, third-party adapters that don't populate * it, unit tests that don't pass hints — we fall back to a * TypeScript-shaped textual regex so the rule never silently goes * dark on a TS project. The fidelity matrix in the graph * rules-and-gating documentation enumerates which rules degrade * gracefully when an adapter omits a given hint. */ export declare const noSideEffectPathRule: import("../types.js").Rule; //# sourceMappingURL=no-side-effect-path.d.ts.map