(includeCompilerErrors: boolean)
| 158 | } |
| 159 | |
| 160 | function flushGroupedDiagnostics(includeCompilerErrors: boolean): boolean { |
| 161 | const diagOpts = { baseDir: diagnosticBaseDir ?? undefined }; |
| 162 | const diagnosticSections: string[] = []; |
| 163 | |
| 164 | if (includeCompilerErrors && groupedCompilerErrors.length > 0) { |
| 165 | diagnosticSections.push(formatGroupedCompilerErrors(groupedCompilerErrors, diagOpts)); |
| 166 | groupedCompilerErrors.length = 0; |
| 167 | } |
| 168 | if (groupedTestFailures.length > 0) { |
| 169 | diagnosticSections.push(formatGroupedTestFailures(groupedTestFailures, diagOpts)); |
| 170 | groupedTestFailures.length = 0; |
| 171 | } |
| 172 | if (groupedWarnings.length > 0) { |
| 173 | diagnosticSections.push(formatGroupedWarnings(groupedWarnings, diagOpts)); |
| 174 | groupedWarnings.length = 0; |
| 175 | } |
| 176 | |
| 177 | if (diagnosticSections.length === 0) { |
| 178 | return false; |
| 179 | } |
| 180 | |
| 181 | const diagnosticsBlock = diagnosticSections.join('\n\n'); |
| 182 | if (pendingTransientRuntimeLine) { |
| 183 | writeSection(`${pendingTransientRuntimeLine}\n\n${diagnosticsBlock}`); |
| 184 | pendingTransientRuntimeLine = null; |
| 185 | } else if (hasDurableRuntimeContent) { |
| 186 | writeSection(diagnosticsBlock); |
| 187 | } else { |
| 188 | writeDurable(diagnosticsBlock); |
| 189 | } |
| 190 | |
| 191 | return true; |
| 192 | } |
| 193 | |
| 194 | function processItem(item: TextRenderableItem): void { |
| 195 | switch (item.type) { |
no test coverage detected