File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,15 @@ export interface CodeQL {
218218export interface VersionInfo {
219219 version : string ;
220220 features ?: { [ name : string ] : boolean } ;
221+ /**
222+ * The overlay version helps deal with backward incompatible changes for
223+ * overlay analysis. When a precompiled query pack reports the same overlay
224+ * version as the CodeQL CLI, we can use the CodeQL CLI to perform overlay
225+ * analysis with that pack. Otherwise, if the overlay versions are different,
226+ * or if either the pack or the CLI does not report an overlay version,
227+ * we need to revert to non-overlay analysis.
228+ */
229+ overlayVersion ?: number ;
221230}
222231
223232export interface ResolveLanguagesOutput {
Original file line number Diff line number Diff line change @@ -254,18 +254,21 @@ export function mockLanguagesInRepo(languages: string[]) {
254254export const makeVersionInfo = (
255255 version : string ,
256256 features ?: { [ name : string ] : boolean } ,
257+ overlayVersion ?: number ,
257258) : codeql . VersionInfo => ( {
258259 version,
259260 features,
261+ overlayVersion,
260262} ) ;
261263
262264export function mockCodeQLVersion (
263265 version : string ,
264266 features ?: { [ name : string ] : boolean } ,
267+ overlayVersion ?: number ,
265268) {
266269 return codeql . setCodeQL ( {
267270 async getVersion ( ) {
268- return makeVersionInfo ( version , features ) ;
271+ return makeVersionInfo ( version , features , overlayVersion ) ;
269272 } ,
270273 } ) ;
271274}
You can’t perform that action at this time.
0 commit comments