Skip to content

Commit 8dd0d76

Browse files
committed
Avoid showing an error when query has not @kind metadata
Fixes #800
1 parent 73e560e commit 8dd0d76

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

extensions/ql-vscode/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [UNRELEASED]
44

5+
- Avoid showing an error popup when user runs a query without `@kind` metadata. [#801](https://github.com/github/vscode-codeql/pull/801)
6+
57
## 1.4.4 - 19 March 2021
68

79
- 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)

extensions/ql-vscode/src/run-queries.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,12 @@ export class QueryInfo {
169169
if (!hasMetadataFile) {
170170
logger.log('Cannot produce interpreted results since the database does not have a .dbinfo or codeql-database.yml file.');
171171
}
172-
return hasMetadataFile;
172+
173+
const hasKind = !!this.metadata?.kind;
174+
if (!hasKind) {
175+
logger.log('Cannot produce interpreted results since the query does not have @kind metadata.');
176+
}
177+
return hasMetadataFile && hasKind;
173178
}
174179

175180
/**

0 commit comments

Comments
 (0)