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 {
226226export interface VersionInfo {
227227 version : string ;
228228 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 ;
229238}
230239
231240export 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 . createStubCodeQL ( {
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