是否有机会将所有编译错误和警告从 VSCode 的问题 View 导出为某种表格格式?
如果错误数量很大,那么在 VSCode 之外的某个地方分析它们会很有用。
最佳答案
在没有扩展名的情况下,这在 vscode 中仍然是不可能的。于是我发表了一篇:
Problems: Copy
您可以复制工作区或当前文件中的所有问题。并且可以过滤这些以包含/排除 Errors/Warnings/Informations/Hints
.
示例键绑定(bind):
{
"key": "alt+c", // whatever keybinding you want
"command": "problems-copy.copyAll",
"args": {
"errors": true, // will be included in the result
"warnings": true
// any category not in the keybinding will be excluded from the result
// "hints": true
// "informations": true
}
}
输出被添加到剪贴板。示例输出:[
{
"resource": "/c:/Users/Mark/folder-operations/extension.js",
"code": {
"value": "no-unused-vars",
"target": {
"$mid": 1,
"path": "/docs/rules/no-unused-vars",
"scheme": "https",
"authority": "eslint.org"
}
},
"severity": 1,
"message": "'args' is defined but never used.",
"source": "eslint",
"startLineNumber": 32,
"startColumn": 102,
"endLineNumber": 32,
"endColumn": 106
}
]
我计划生成更简单的输出,包括 csv 版本。您想要 csv 或简单输出中的哪些字段?
关于compiler-errors - 如何将所有编译错误和警告从 VSCode 问题 View 导出到 txt/excel 或类似文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51743343/