buildErrors: getErrorCounts()

in packages/react/src/store/selectors/tableSelectors.ts [240:280]


        buildErrors: getErrorCounts(projectToApiAnalysis, project.projectFilePath, null),
        portingActions: getActionCounts(projectToApiAnalysis, project.projectFilePath, null),
        ported: isPortingCompleted(solutionFilePath, project, portingProjects),
        buildFailed:
          project.projectFilePath != null &&
          projectToApiAnalysis != null &&
          isFailed(projectToApiAnalysis[project.projectFilePath])
      };
    });
  }
)((_state, locationPath) => locationPath);

export const getProjectIfExists = (state: RootState, locationPath: string) => {
  const match = matchPath<{ solution: string; project: string }>(locationPath, {
    path: pathValues,
    exact: true,
    strict: false
  });
  if (match == null || match.params?.project == null) {
    return null;
  }
  return selectCurrentProject(state, locationPath);
};

export const selectApiTableData = createCachedSelector(
  selectCurrentSolutionApiAnalysis,
  getProjectIfExists,
  selectTargetFramework,
  (currentSolutionApiAnalysis, project, targetFramework) => {
    if ((project != null && !isLoaded(project)) || currentSolutionApiAnalysis == null) {
      return Array<ApiTableData>();
    }
    const apiNameToApiItem: { [api: string]: ApiTableData } = {};

    const allApiAnalysis =
      project == null
        ? Object.values(currentSolutionApiAnalysis)
        : [currentSolutionApiAnalysis[project.data.projectFilePath]];
    let isApisLoading = false;
    allApiAnalysis.forEach(projectApiAnalysisResult => {
      if (isLoading(projectApiAnalysisResult) || isReloading(projectApiAnalysisResult)) {