mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
Make schema for QueryFilter less strict
This commit is contained in:
3
lib/init-action.js
generated
3
lib/init-action.js
generated
@@ -35375,7 +35375,8 @@ var require_db_config_schema = __commonJS({
|
||||
},
|
||||
{
|
||||
$ref: "#/definitions/IncludeQueryFilter"
|
||||
}
|
||||
},
|
||||
{}
|
||||
]
|
||||
},
|
||||
ExcludeQueryFilter: {
|
||||
|
||||
@@ -442,6 +442,25 @@ test("parseUserConfig - throws a ConfigurationError if the file is not valid YAM
|
||||
);
|
||||
});
|
||||
|
||||
test("parseUserConfig - validation isn't picky about `query-filters`", (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
|
||||
t.notThrows(() =>
|
||||
dbConfig.parseUserConfig(
|
||||
logger,
|
||||
"test",
|
||||
`
|
||||
query-filters:
|
||||
- something
|
||||
- include: foo
|
||||
- exclude: bar
|
||||
`,
|
||||
true,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("parseUserConfig - throws a ConfigurationError if validation fails", (t) => {
|
||||
const loggedMessages: LoggedMessage[] = [];
|
||||
const logger = getRecordingLogger(loggedMessages);
|
||||
|
||||
@@ -87,7 +87,8 @@
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/IncludeQueryFilter"
|
||||
}
|
||||
},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"ExcludeQueryFilter": {
|
||||
|
||||
Reference in New Issue
Block a user