@eagleoutice/flowr - v2.17.4
    Preparing search index...

    Finds code clones in all files of the analysis with a configurable selection of algorithms. Keep in mind that:

    • the config is merged into the defaults of DefaultCloneDetectionConfig, so state only what you change
    • only the dataflow perspective needs the dataflow analysis
    • against must use the perspective of the query, otherwise the query throws, and with it only clones between the analyzed files and the stored ones are reported
    • nodes of fragments from against are marked external and are not part of the nodes this query involves
    const { pairs } = await analyzer.query({ type: 'code-clones', algorithms: [CloneAlgorithm.Gst, CloneAlgorithm.Baxter], config: { gst: { threshold: 0.9 } } });
    const { index } = await analyzer.query({ type: 'code-clones', exportIndex: true }); // store it, search it later with `against: [index]`
    interface CodeClonesQuery {
        against?: readonly SerializedCloneIndex[];
        algorithms?: readonly CloneAlgorithm[];
        config?: { [key: string]: unknown; [key: number]: unknown };
        exportIndex?: boolean;
        perspective?: ClonePerspective;
        type: "code-clones";
    }

    Hierarchy (View Summary)

    Index
    against?: readonly SerializedCloneIndex[]

    previously exported indices: then only clones between the analyzed files and these are reported

    algorithms?: readonly CloneAlgorithm[]

    the algorithms to run, gst if omitted

    config?: { [key: string]: unknown; [key: number]: unknown }

    thresholds and options of the algorithms, merged into the defaults

    exportIndex?: boolean

    also return the clone index of the analyzed files, to store it and search against it later

    perspective?: ClonePerspective

    how the code is presented to the algorithms, canonical if omitted

    type: "code-clones"

    used to select the query type :)