AutoMovie API
    Preparing search index...

    Function appendGraphCycles

    • Report every link that closes a cycle in a graph of declared ids.

      Nodes are visited depth first in declaration order, following each node's links in order. A link to a node still on the current path closes a cycle and pushes one type violation with message at that target node's path, carrying its value. A link naming no node is skipped, because the dangling reference is reported on its own path, and a node already finished is not walked again. Ids are matched by string equality; when two nodes share an id, the later one stands for it.

      The walk keeps its own stack instead of recursing, so a chain as long as the whole graph, such as a revision history thousands deep, cannot overflow the call stack.

      Parameters

      • nodes: INodes

        Graph nodes with their outgoing links, the violation path to report a cycle on, and the value to report there.

      • message: string

        Violation message, such as design revision graph must be acyclic.

      • collector: IAutoMovieViolationCollector

        Sink that receives the violations.

      Returns void