Skip to content

Commit 08b1a89

Browse files
committed
Avoid showing an error when query has not @kind metadata
Fixes #800
1 parent df93616 commit 08b1a89

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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)