Avoid showing an error when query has not @kind metadata (#801)

Fixes #800
This commit is contained in:
Andrew Eisenberg
2021-03-22 08:03:13 -07:00
committed by GitHub
parent 73e560e6da
commit 8c2db75886
2 changed files with 8 additions and 1 deletions

View File

@@ -2,6 +2,8 @@
## [UNRELEASED]
- Avoid showing an error popup when user runs a query without `@kind` metadata. [#801](https://github.com/github/vscode-codeql/pull/801)
## 1.4.4 - 19 March 2021
- Introduce evaluator options for saving intermediate results to the disk cache (`codeQL.runningQueries.saveCache`) and for limiting the size of this cache (`codeQL.runningQueries.cacheSize`). [#778](https://github.com/github/vscode-codeql/pull/778)

View File

@@ -169,7 +169,12 @@ export class QueryInfo {
if (!hasMetadataFile) {
logger.log('Cannot produce interpreted results since the database does not have a .dbinfo or codeql-database.yml file.');
}
return hasMetadataFile;
const hasKind = !!this.metadata?.kind;
if (!hasKind) {
logger.log('Cannot produce interpreted results since the query does not have @kind metadata.');
}
return hasMetadataFile && hasKind;
}
/**