mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Use joinAtMost for log message
This commit is contained in:
9
lib/init-action.js
generated
9
lib/init-action.js
generated
@@ -87186,6 +87186,13 @@ async function asyncSome(array, predicate) {
|
||||
function isDefined(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function joinAtMost(array, separator, limit) {
|
||||
if (limit > 0 && array.length > limit) {
|
||||
array = array.slice(0, limit);
|
||||
array.push("...");
|
||||
}
|
||||
return array.join(separator);
|
||||
}
|
||||
|
||||
// src/actions-util.ts
|
||||
var pkg = require_package();
|
||||
@@ -89637,7 +89644,7 @@ async function initConfig(features, inputs) {
|
||||
config.computedConfig["paths-ignore"] ??= [];
|
||||
config.computedConfig["paths-ignore"].push(...generatedFiles);
|
||||
logger.info(
|
||||
`Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${generatedFiles.join(", ")}`
|
||||
`Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${joinAtMost(generatedFiles, ", ", 10)}`
|
||||
);
|
||||
} else {
|
||||
logger.info(`Found no generated files.`);
|
||||
|
||||
@@ -60,6 +60,7 @@ import {
|
||||
getCodeQLMemoryLimit,
|
||||
getErrorMessage,
|
||||
isInTestMode,
|
||||
joinAtMost,
|
||||
} from "./util";
|
||||
|
||||
export * from "./config/db-config";
|
||||
@@ -964,7 +965,7 @@ export async function initConfig(
|
||||
config.computedConfig["paths-ignore"] ??= [];
|
||||
config.computedConfig["paths-ignore"].push(...generatedFiles);
|
||||
logger.info(
|
||||
`Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${generatedFiles.join(", ")}`,
|
||||
`Detected ${generatedFiles.length} generated file(s), which will be excluded from analysis: ${joinAtMost(generatedFiles, ", ", 10)}`,
|
||||
);
|
||||
} else {
|
||||
logger.info(`Found no generated files.`);
|
||||
|
||||
Reference in New Issue
Block a user