Skip to content

Commit 00c0e70

Browse files
authored
Merge pull request #3527 from aeisenberg/aeisenberg/fix-qlpack-schema
Fix the qlpack json schema
2 parents 7da3740 + 44c3c29 commit 00c0e70

File tree

5 files changed

+54
-19
lines changed

5 files changed

+54
-19
lines changed

extensions/ql-vscode/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [UNRELEASED]
44

55
- Add new supported source and sink kinds in the CodeQL Model Editor [#3511](https://github.com/github/vscode-codeql/pull/3511)
6+
- Fix a bug where the test explorer wouldn't display certain tests. [#3527](https://github.com/github/vscode-codeql/pull/3527)
67

78
## 1.12.4 - 20 March 2024
89

extensions/ql-vscode/src/model-editor/extension-pack-metadata.schema.json

+25-8
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
"$ref": "#/definitions/SuiteInstruction"
6868
}
6969
},
70+
{
71+
"$ref": "#/definitions/SuiteInstruction"
72+
},
7073
{
7174
"type": "null"
7275
}
@@ -93,19 +96,33 @@
9396
"include": {
9497
"type": "object",
9598
"additionalProperties": {
96-
"type": "array",
97-
"items": {
98-
"type": "string"
99-
}
99+
"anyOf": [
100+
{
101+
"type": "array",
102+
"items": {
103+
"type": "string"
104+
}
105+
},
106+
{
107+
"type": "string"
108+
}
109+
]
100110
}
101111
},
102112
"exclude": {
103113
"type": "object",
104114
"additionalProperties": {
105-
"type": "array",
106-
"items": {
107-
"type": "string"
108-
}
115+
"anyOf": [
116+
{
117+
"type": "array",
118+
"items": {
119+
"type": "string"
120+
}
121+
},
122+
{
123+
"type": "string"
124+
}
125+
]
109126
}
110127
},
111128
"description": {

extensions/ql-vscode/src/packaging/qlpack-file.schema.json

+25-8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
"$ref": "#/definitions/SuiteInstruction"
5252
}
5353
},
54+
{
55+
"$ref": "#/definitions/SuiteInstruction"
56+
},
5457
{
5558
"type": "null"
5659
}
@@ -93,19 +96,33 @@
9396
"include": {
9497
"type": "object",
9598
"additionalProperties": {
96-
"type": "array",
97-
"items": {
98-
"type": "string"
99-
}
99+
"anyOf": [
100+
{
101+
"type": "array",
102+
"items": {
103+
"type": "string"
104+
}
105+
},
106+
{
107+
"type": "string"
108+
}
109+
]
100110
}
101111
},
102112
"exclude": {
103113
"type": "object",
104114
"additionalProperties": {
105-
"type": "array",
106-
"items": {
107-
"type": "string"
108-
}
115+
"anyOf": [
116+
{
117+
"type": "array",
118+
"items": {
119+
"type": "string"
120+
}
121+
},
122+
{
123+
"type": "string"
124+
}
125+
]
109126
}
110127
},
111128
"description": {

extensions/ql-vscode/src/packaging/qlpack-file.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface QlPackFile {
1010
extensionTargets?: Record<string, string> | null;
1111
dbscheme?: string | null;
1212
library?: boolean | null;
13-
defaultSuite?: SuiteInstruction[] | null;
13+
defaultSuite?: SuiteInstruction[] | SuiteInstruction | null;
1414
defaultSuiteFile?: string | null;
1515
dataExtensions?: string[] | string | null;
1616
}

extensions/ql-vscode/src/packaging/suite-instruction.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export interface SuiteInstruction {
55
qlpack?: string;
66
query?: string;
77
queries?: string;
8-
include?: Record<string, string[]>;
9-
exclude?: Record<string, string[]>;
8+
include?: Record<string, string[] | string>;
9+
exclude?: Record<string, string[] | string>;
1010
description?: string;
1111
import?: string;
1212
from?: string;

0 commit comments

Comments
 (0)