MCPcopy Index your code
hub / github.com/nodejs/node / reportErrorSummary

Function reportErrorSummary

test/fixtures/snapshot/typescript.js:125491–125526  ·  view source on GitHub ↗
(state, buildOrder)

Source from the content-addressed store, hash-verified

125489 reportAndStoreErrors(state, proj, [state.configFileCache.get(proj)]);
125490 }
125491 function reportErrorSummary(state, buildOrder) {
125492 if (!state.needsSummary)
125493 return;
125494 state.needsSummary = false;
125495 var canReportSummary = state.watch || !!state.host.reportErrorSummary;
125496 var diagnostics = state.diagnostics;
125497 var totalErrors = 0;
125498 var filesInError = [];
125499 if (isCircularBuildOrder(buildOrder)) {
125500 reportBuildQueue(state, buildOrder.buildOrder);
125501 reportErrors(state, buildOrder.circularDiagnostics);
125502 if (canReportSummary)
125503 totalErrors += ts.getErrorCountForSummary(buildOrder.circularDiagnostics);
125504 if (canReportSummary)
125505 filesInError = __spreadArray(__spreadArray([], filesInError, true), ts.getFilesInErrorForSummary(buildOrder.circularDiagnostics), true);
125506 }
125507 else {
125508 // Report errors from the other projects
125509 buildOrder.forEach(function (project) {
125510 var projectPath = toResolvedConfigFilePath(state, project);
125511 if (!state.projectErrorsReported.has(projectPath)) {
125512 reportErrors(state, diagnostics.get(projectPath) || ts.emptyArray);
125513 }
125514 });
125515 if (canReportSummary)
125516 diagnostics.forEach(function (singleProjectErrors) { return totalErrors += ts.getErrorCountForSummary(singleProjectErrors); });
125517 if (canReportSummary)
125518 diagnostics.forEach(function (singleProjectErrors) { return __spreadArray(__spreadArray([], filesInError, true), ts.getFilesInErrorForSummary(singleProjectErrors), true); });
125519 }
125520 if (state.watch) {
125521 reportWatchStatus(state, ts.getWatchErrorSummaryDiagnosticMessage(totalErrors), totalErrors);
125522 }
125523 else if (state.host.reportErrorSummary) {
125524 state.host.reportErrorSummary(totalErrors, filesInError);
125525 }
125526 }
125527 /**
125528 * Report the build ordering inferred from the current project graph if we're in verbose mode
125529 */

Callers 2

buildFunction · 0.85

Calls 8

isCircularBuildOrderFunction · 0.85
reportBuildQueueFunction · 0.85
reportErrorsFunction · 0.85
toResolvedConfigFilePathFunction · 0.85
reportWatchStatusFunction · 0.85
forEachMethod · 0.65
hasMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…