Skip to content

Commit

Permalink
Hoist linker (ld) errors to VS Code 'Problems' window (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesZunino authored Oct 8, 2024
1 parent bf9df82 commit bdadcd0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@
"severity": 4,
"message": 5
}
},
{
"name": "espIdfLd",
"owner": "cpp",
"fileLocation": [
"autoDetect",
"${workspaceFolder}"
],
"severity": "error",
"pattern": {
"regexp": "^.+\\/bin\\/ld[^:]+:\\s*(.+):(\\d+):(.+)$",
"file": 1,
"line": 2,
"message": 3
}
}
],
"viewsContainers": {
Expand Down
4 changes: 2 additions & 2 deletions src/build/buildTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class BuildTask {
currentWorkspaceFolder || vscode.TaskScope.Workspace,
"ESP-IDF Compile",
compileExecution,
["espIdf"],
["espIdf", "espIdfLd"],
compilePresentationOptions
);
compilerArgs = [];
Expand All @@ -237,7 +237,7 @@ export class BuildTask {
currentWorkspaceFolder || vscode.TaskScope.Workspace,
"ESP-IDF Build",
buildExecution,
["espIdf"],
["espIdf", "espIdfLd"],
buildPresentationOptions
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/customTasks/customTaskProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class CustomTask {
currentWorkspaceFolder || TaskScope.Workspace,
`ESP-IDF ${taskName}`,
customExecution,
["espIdf"],
["espIdf", "espIdfLd"],
customTaskPresentationOptions
);
}
Expand Down

0 comments on commit bdadcd0

Please sign in to comment.