mirror of
https://github.com/github/codeql-action.git
synced 2026-11-16 09:41:27 +00:00
Tolerate NoSourceCodeSeen errors in CCR
This commit is contained in:
16
lib/setup-codeql-action.js
generated
16
lib/setup-codeql-action.js
generated
@@ -102946,6 +102946,7 @@ var cliErrorsConfig = {
|
||||
// was unintended to have CodeQL analysis run on it.
|
||||
["NoSourceCodeSeen" /* NoSourceCodeSeen */]: {
|
||||
exitCode: 32,
|
||||
toleratedByCCR: true,
|
||||
cliErrorMessageCandidates: [
|
||||
new RegExp(
|
||||
"CodeQL detected code written in .* but could not process any of it"
|
||||
@@ -103034,6 +103035,15 @@ function getUnsupportedPlatformError(cliError) {
|
||||
`The CodeQL CLI does not support the platform/architecture combination of ${process.platform}/${process.arch} (see ${"https://codeql.github.com/docs/codeql-overview/system-requirements/" /* SYSTEM_REQUIREMENTS */}). The underlying error was: ${cliError.message}`
|
||||
);
|
||||
}
|
||||
var ToleratedConfigurationError = class extends ConfigurationError {
|
||||
constructor(category, message) {
|
||||
super(message);
|
||||
this.category = category;
|
||||
}
|
||||
getCategory() {
|
||||
return this.category;
|
||||
}
|
||||
};
|
||||
function wrapCliConfigurationError(cliError) {
|
||||
if (isUnsupportedPlatform()) {
|
||||
return getUnsupportedPlatformError(cliError);
|
||||
@@ -103047,6 +103057,12 @@ function wrapCliConfigurationError(cliError) {
|
||||
if (additionalErrorMessageToAppend !== void 0) {
|
||||
errorMessageBuilder = `${errorMessageBuilder} ${additionalErrorMessageToAppend}`;
|
||||
}
|
||||
if (cliErrorsConfig[cliConfigErrorCategory].toleratedByCCR) {
|
||||
return new ToleratedConfigurationError(
|
||||
cliConfigErrorCategory,
|
||||
errorMessageBuilder
|
||||
);
|
||||
}
|
||||
return new ConfigurationError(errorMessageBuilder);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user