File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ type SelectedQuery = {
313313 * @param selectedResourceUri The selected resource when the command was run.
314314 * @param quickEval Whether the command being run is `Quick Evaluation`.
315315*/
316- async function determineSelectedQuery ( selectedResourceUri : vscode . Uri | undefined , quickEval : boolean ) : Promise < SelectedQuery > {
316+ export async function determineSelectedQuery ( selectedResourceUri : vscode . Uri | undefined , quickEval : boolean ) : Promise < SelectedQuery > {
317317 const editor = vscode . window . activeTextEditor ;
318318
319319 // Choose which QL file to use.
@@ -336,8 +336,15 @@ async function determineSelectedQuery(selectedResourceUri: vscode.Uri | undefine
336336 }
337337 const queryPath = queryUri . fsPath || '' ;
338338
339- if ( ! queryPath . endsWith ( '.ql' ) ) {
340- throw new Error ( 'The selected resource is not a CodeQL query file; It should have the extension ".ql".' ) ;
339+ if ( quickEval ) {
340+ if ( ! ( queryPath . endsWith ( '.ql' ) || queryPath . endsWith ( '.qll' ) ) ) {
341+ throw new Error ( 'The selected resource is not a CodeQL file; It should have the extension ".ql" or ".qll".' ) ;
342+ }
343+ }
344+ else {
345+ if ( ! ( queryPath . endsWith ( '.ql' ) ) ) {
346+ throw new Error ( 'The selected resource is not a CodeQL query file; It should have the extension ".ql".' ) ;
347+ }
341348 }
342349
343350 // Whether we chose the file from the active editor or from a context menu,
You can’t perform that action at this time.
0 commit comments