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

    Variable CODE_CLONESConst

    CODE_CLONES: {
        createSearch: () => FlowrSearchBuilder<
            "from",
            [],
            ParentInformation,
            FlowrSearchElements<ParentInformation, (...)[]>,
        >;
        info: {
            activeByDefault: false;
            certainty: BestEffort;
            defaultConfig: () => {
                algorithms: (...)[];
                baxter: BaxterDetectionConfig;
                gst: GstConfig;
                maxPairs: number;
                perspective: Canonical;
                scope: CloneScope;
                winnowing: WinnowingConfig;
            };
            description: "Finds duplicated code (code clones) with a configurable selection of AST, token, and fingerprint based algorithms.";
            name: "Code Clones";
            tags: readonly [Smell, Readability, Experimental];
        };
        prettyPrint: {
            full: (r: CodeClonesResult, metadata: unknown) => string;
            query: (r: CodeClonesResult, metadata: unknown) => string;
        };
        processSearchResult: (
            _elements: FlowrSearchElements<
                ParentInformation,
                FlowrSearchElement<(...)>[],
            >,
            config: CodeClonesConfig,
            analyzer: ReadonlyFlowrAnalysisProvider<KnownParser>,
        ) => Promise<{ ".meta": CloneDetectionStats; results: (...)[] }>;
    } = ...

    Reports each code clone pair once, located at its first fragment, with the other fragment in the result. It is best-effort and off by default, as it indexes the whole project. A pair is reported once per algorithm that finds it.

    Type Declaration

    const lint = await executeLintingRule('code-clones', analyzer, { algorithms: [CloneAlgorithm.Baxter], baxter: { similarityThreshold: 0.8 } });
    if('results' in lint) {
    lint.results.map(r => `${SourceLocation.format(r.loc)} ~ ${SourceLocation.format(r.clone.loc)}`);
    }