mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 09:18:47 +00:00
Include first 10 errors in exception message
This commit is contained in:
Generated
+4
-3
@@ -87762,8 +87762,9 @@ function getConfigFileDoesNotExistErrorMessage(configFile) {
|
||||
function getConfigFileParseErrorMessage(configFile, message) {
|
||||
return `Cannot parse "${configFile}": ${message}`;
|
||||
}
|
||||
function getInvalidConfigFileMessage(configFile, detail) {
|
||||
return `The configuration file "${configFile}" is invalid: ${detail}`;
|
||||
function getInvalidConfigFileMessage(configFile, messages) {
|
||||
const andMore = messages.length > 10 ? `, and ${messages.length - 10} more.` : ".";
|
||||
return `The configuration file "${configFile}" is invalid: ${messages.slice(0, 10).join(", ")}${andMore}`;
|
||||
}
|
||||
function getConfigFileRepoFormatInvalidMessage(configFile) {
|
||||
let error2 = `The configuration file "${configFile}" is not a supported remote file reference.`;
|
||||
@@ -88071,7 +88072,7 @@ function parseUserConfig(logger, pathInput, contents) {
|
||||
throw new ConfigurationError(
|
||||
getInvalidConfigFileMessage(
|
||||
pathInput,
|
||||
`There are ${result.errors.length} error(s)`
|
||||
result.errors.map((e) => e.stack)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user