( cwd: string, includeDiagnosticMessages: boolean = true, maxDiagnosticMessages: number = 50, )
| 391 | } |
| 392 | |
| 393 | async function getWorkspaceProblems( |
| 394 | cwd: string, |
| 395 | includeDiagnosticMessages: boolean = true, |
| 396 | maxDiagnosticMessages: number = 50, |
| 397 | ): Promise<string> { |
| 398 | const diagnostics = vscode.languages.getDiagnostics() |
| 399 | const result = await diagnosticsToProblemsString( |
| 400 | diagnostics, |
| 401 | [vscode.DiagnosticSeverity.Error, vscode.DiagnosticSeverity.Warning], |
| 402 | cwd, |
| 403 | includeDiagnosticMessages, |
| 404 | maxDiagnosticMessages, |
| 405 | ) |
| 406 | if (!result) { |
| 407 | return "No errors or warnings detected." |
| 408 | } |
| 409 | return result |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * Gets the contents of the active terminal |
no test coverage detected