Skip to content

Commit c8513b2

Browse files
committed
Overlay: report overlay analysis mode
1 parent 7710ed1 commit c8513b2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/analyze.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,18 @@ export interface QueriesStatusReport {
132132
*/
133133
analysis_is_diff_informed?: boolean;
134134

135+
/**
136+
* Whether the analysis runs in overlay mode (i.e., uses an overlay-base database).
137+
* This is true if the AugmentationProperties.overlayDatabaseMode === Overlay.
138+
*/
139+
analysis_is_overlay?: boolean;
140+
141+
/**
142+
* Whether the analysis builds an overlay-base database.
143+
* This is true if the AugmentationProperties.overlayDatabaseMode === OverlayBase.
144+
*/
145+
analysis_builds_overlay_base_database?: boolean;
146+
135147
/** Name of language that errored during analysis (or undefined if no language failed). */
136148
analyze_failure_language?: string;
137149
/** Reports on discrete events associated with this status report. */
@@ -617,12 +629,20 @@ export async function runQueries(
617629
queryFlags.push("--extension-packs=codeql-action/pr-diff-range");
618630
incrementalMode.push("diff-informed");
619631
}
632+
620633
if (
621634
config.augmentationProperties.overlayDatabaseMode ===
622635
OverlayDatabaseMode.Overlay
623636
) {
637+
statusReport.analysis_is_overlay = true;
624638
incrementalMode.push("overlay");
639+
} else if (
640+
config.augmentationProperties.overlayDatabaseMode ===
641+
OverlayDatabaseMode.OverlayBase
642+
) {
643+
statusReport.analysis_builds_overlay_base_database = true;
625644
}
645+
626646
const sarifRunPropertyFlag =
627647
incrementalMode.length > 0
628648
? `--sarif-run-property=incrementalMode=${incrementalMode.join(",")}`

0 commit comments

Comments
 (0)