ITADN

[Bug] Incorrect gnuld message displayed in Problems panel as diagnostics

#4910Openmariafilip-nxp 创建于 2026-04-24
bug
M
mariafilip-nxpcommented
### Brief Issue Summary CMake Tools is creating diagnostics for informational build output lines like: `-- Zephyr version: 4.3.0 (/path/to/zephyr), build: v4.3.0` These appear in VS Code's Problems panel with: - Owner: `cmake-build-diags` - Severity: Information (8) - Source: `cmake GNULD` ``` [{ "resource": "/path/to/project/build/-- Zephyr version: 4.3.0 (/path/to/zephyr), build", "owner": "cmake-build-diags", "severity": 8, "message": "v4.3.0", "source": "cmake GNULD", "startLineNumber": 1, "startColumn": 1, "endLineNumber": 1, "endColumn": 1000, "origin": "extHost7" }] ``` Users see "problems" in the Problems panel when there are no actual issues, making it harder to identify real build errors and warnings. Root Cause: Found the incorrect regex in `microsoft/vscode-cmake-tools/src/diagnostics/gnu-ld.ts`: ``` { // path/to/ld[.exe]: message (without trailing colon) regexPattern: /^(.*ld(?:\.exe)?):\s+(.+)(?<!:)\s*$/, matchTypes: [MatchType.Full, MatchType.File, MatchType.Message] } ``` Expected behavior: Informational build status messages should not appear in the Problems panel. Only actual warnings and errors should be shown as diagnostics. Actual behavior: Normal build output containing "ld:" or "build:" is incorrectly parsed as GNU linker diagnostics. ### CMake Tools Diagnostics ```shell "os": "darwin", "vscodeVersion": "1.114.0", "cmtVersion": "1.24.4" ``` ### Debug Log ```shell - ``` ### Additional Information _No response_
3 条评论