mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 22:50:17 +08:00
Refactor configuration errors (#2105)
Refactor the existing classes of configuration errors into their own file; consolidate the place we check for configuration errors into `codeql.ts`, where the actual command invocations happen. Also, rename the `UserError` type to `ConfigurationError` to standardize on a single term.
This commit is contained in:
@@ -875,9 +875,11 @@ test("database finalize recognises JavaScript no code found error on CodeQL 2.11
|
||||
await t.throwsAsync(
|
||||
async () => await codeqlObject.finalizeDatabase("", "", ""),
|
||||
{
|
||||
message:
|
||||
instanceOf: util.ConfigurationError,
|
||||
message: new RegExp(
|
||||
"No code found during the build. Please see: " +
|
||||
"https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build",
|
||||
"https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build.+",
|
||||
),
|
||||
},
|
||||
);
|
||||
});
|
||||
@@ -892,9 +894,11 @@ test("database finalize overrides no code found error on CodeQL 2.11.6", async (
|
||||
await t.throwsAsync(
|
||||
async () => await codeqlObject.finalizeDatabase("", "", ""),
|
||||
{
|
||||
message:
|
||||
instanceOf: util.ConfigurationError,
|
||||
message: new RegExp(
|
||||
"No code found during the build. Please see: " +
|
||||
"https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build",
|
||||
"https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build.+",
|
||||
),
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user