You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(tools): errors_list counts are capped by maxResults and Truncated is never set #113
errors_list reports wrong counts when results are capped by maxResults, and it never says that results were cut off.
In VisualStudioService.GetErrorListAsync:
The loop stops as soon as maxResults items have been collected (if (count >= maxResults) break;). Entries after that are never looked at.
TotalCount, ErrorCount, WarningCount and MessageCount are only incremented for items added to Items, so they can never be higher than maxResults.
ErrorListResult.Truncated exists in DiagnosticsModels.cs but is never set, so it is always false.
So with 250 errors and the default maxResults = 100, the tool returns TotalCount: 100, ErrorCount: 100, Truncated: false. The caller has no way to know 150 errors are missing.
The severity filter has the same effect: entries skipped by the filter are never counted. With severity: "Error", WarningCount and MessageCount are always 0, even when the Error List has warnings and messages.
Repro
Open a solution whose Error List has more than 100 entries (or call with a small maxResults, e.g. maxResults: 5).
Call errors_list.
TotalCount equals the number of items returned and Truncated is false.
Expected
The counts reflect every entry in the Error List, not just the returned page.
Truncated is true when more entries matched than maxResults allowed, matching how symbol_workspace and find_references already set it.
Also
When nothing matches, a placeholder item ("No errors or warnings in the Error List. Build the project to populate the Error List.") is added to Items with severity Message, while MessageCount and TotalCount stay 0. When a severity filter is active this text is misleading, because the Error List may have plenty of entries that the filter excluded. An empty Items list with correct counts would be clearer.
Related
#111 asks for more errors_list filters. More filters make accurate counts and Truncated more important, so this is worth fixing first or alongside it.
Fixed by #114. errors_list now counts every Error List entry whatever maxResults or the severity filter, sets Truncated when more entries match than maxResults allows, and returns an empty Items list instead of the placeholder item. #114 didn't link this issue, so it wasn't closed automatically.
Activity
CalvinAllen commentedon Oct 1, 2026
Fixed by #114.
errors_listnow counts every Error List entry whatevermaxResultsor the severity filter, setsTruncatedwhen more entries match thanmaxResultsallows, and returns an emptyItemslist instead of the placeholder item. #114 didn't link this issue, so it wasn't closed automatically.