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 @@ -226,6 +226,15 @@ export interface CodeQL {
226
226
export interface VersionInfo {
227
227
version : string ;
228
228
features ?: { [ name : string ] : boolean } ;
229
+ /**
230
+ * The overlay version helps deal with backward incompatible changes for
231
+ * overlay analysis. When a precompiled query pack reports the same overlay
232
+ * version as the CodeQL CLI, we can use the CodeQL CLI to perform overlay
233
+ * analysis with that pack. Otherwise, if the overlay versions are different,
234
+ * or if either the pack or the CLI does not report an overlay version,
235
+ * we need to revert to non-overlay analysis.
236
+ */
237
+ overlayVersion ?: number ;
229
238
}
230
239
231
240
export interface ResolveLanguagesOutput {
Original file line number Diff line number Diff line change @@ -254,18 +254,21 @@ export function mockLanguagesInRepo(languages: string[]) {
254
254
export const makeVersionInfo = (
255
255
version : string ,
256
256
features ?: { [ name : string ] : boolean } ,
257
+ overlayVersion ?: number ,
257
258
) : codeql . VersionInfo => ( {
258
259
version,
259
260
features,
261
+ overlayVersion,
260
262
} ) ;
261
263
262
264
export function mockCodeQLVersion (
263
265
version : string ,
264
266
features ?: { [ name : string ] : boolean } ,
267
+ overlayVersion ?: number ,
265
268
) {
266
269
return codeql . createStubCodeQL ( {
267
270
async getVersion ( ) {
268
- return makeVersionInfo ( version , features ) ;
271
+ return makeVersionInfo ( version , features , overlayVersion ) ;
269
272
} ,
270
273
} ) ;
271
274
}
You can’t perform that action at this time.
0 commit comments