Skip to content

Commit f4df2ff

Browse files
committed
fix: correct parameter name mismatch for diagnostic settings
1 parent c9ebec1 commit f4df2ff

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/integrations/diagnostics/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ export async function diagnosticsToProblemsString(
7474
diagnostics: [vscode.Uri, vscode.Diagnostic[]][],
7575
severities: vscode.DiagnosticSeverity[],
7676
cwd: string,
77-
includeDiagnostics: boolean = true,
78-
maxDiagnostics?: number,
77+
includeDiagnosticMessages: boolean = true,
78+
maxDiagnosticMessages?: number,
7979
): Promise<string> {
8080
// If diagnostics are disabled, return empty string
81-
if (!includeDiagnostics) {
81+
if (!includeDiagnosticMessages) {
8282
return ""
8383
}
8484

@@ -88,7 +88,7 @@ export async function diagnosticsToProblemsString(
8888
let diagnosticCount = 0
8989

9090
// If we have a limit, we need to collect all diagnostics first, sort by severity, then limit
91-
if (maxDiagnostics && maxDiagnostics > 0) {
91+
if (maxDiagnosticMessages && maxDiagnosticMessages > 0) {
9292
// Flatten all diagnostics with their URIs
9393
const allDiagnostics: { uri: vscode.Uri; diagnostic: vscode.Diagnostic }[] = []
9494
for (const [uri, fileDiagnostics] of diagnostics) {
@@ -105,8 +105,8 @@ export async function diagnosticsToProblemsString(
105105
return a.diagnostic.range.start.line - b.diagnostic.range.start.line
106106
})
107107

108-
// Take only the first maxDiagnostics
109-
const limitedDiagnostics = allDiagnostics.slice(0, maxDiagnostics)
108+
// Take only the first maxDiagnosticMessages
109+
const limitedDiagnostics = allDiagnostics.slice(0, maxDiagnosticMessages)
110110

111111
// Group back by URI for processing
112112
const groupedDiagnostics = new Map<string, { uri: vscode.Uri; diagnostics: vscode.Diagnostic[] }>()
@@ -165,8 +165,8 @@ export async function diagnosticsToProblemsString(
165165
}
166166

167167
// Add a note if we hit the limit
168-
if (allDiagnostics.length > maxDiagnostics) {
169-
result += `\n\n(Showing ${maxDiagnostics} of ${allDiagnostics.length} total diagnostics)`
168+
if (allDiagnostics.length > maxDiagnosticMessages) {
169+
result += `\n\n(Showing ${maxDiagnosticMessages} of ${allDiagnostics.length} total diagnostics)`
170170
}
171171
} else {
172172
// No limit, process all diagnostics as before

0 commit comments

Comments
 (0)