Skip to content

Commit 6a51e63

Browse files
committed
Add "overlay" to SARIF incrementalMode run property
1 parent 42835b3 commit 6a51e63

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/analyze.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { EnvVar } from "./environment";
2525
import { FeatureEnablement, Feature } from "./feature-flags";
2626
import { isScannedLanguage, Language } from "./languages";
2727
import { Logger, withGroupAsync } from "./logging";
28+
import { OverlayDatabaseMode } from "./overlay-database-utils";
2829
import { getRepositoryNwoFromEnv } from "./repository";
2930
import { DatabaseCreationTimings, EventReport } from "./status-report";
3031
import { endTracingForCluster } from "./tracer-config";
@@ -604,6 +605,7 @@ export async function runQueries(
604605
): Promise<QueriesStatusReport> {
605606
const statusReport: QueriesStatusReport = {};
606607
const queryFlags = [memoryFlag, threadsFlag];
608+
const incrementalMode: string[] = [];
607609

608610
if (cleanupLevel !== "overlay") {
609611
queryFlags.push("--expect-discarded-cache");
@@ -613,10 +615,18 @@ export async function runQueries(
613615
if (diffRangePackDir) {
614616
queryFlags.push(`--additional-packs=${diffRangePackDir}`);
615617
queryFlags.push("--extension-packs=codeql-action/pr-diff-range");
618+
incrementalMode.push("diff-informed");
616619
}
617-
const sarifRunPropertyFlag = diffRangePackDir
618-
? "--sarif-run-property=incrementalMode=diff-informed"
619-
: undefined;
620+
if (
621+
config.augmentationProperties.overlayDatabaseMode ===
622+
OverlayDatabaseMode.Overlay
623+
) {
624+
incrementalMode.push("overlay");
625+
}
626+
const sarifRunPropertyFlag =
627+
incrementalMode.length > 0
628+
? `--sarif-run-property=incrementalMode=${incrementalMode.join(",")}`
629+
: undefined;
620630

621631
const codeql = await getCodeQL(config.codeQLCmd);
622632

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy