是否有机会将所有编译错误和警告从 VSCode 的问题视图导出为某种表格格式?
如果错误的数量非常大,则在VSCode之外的某个地方分析它们很有用。
虽然不像导出那么容易,但 VSCode 1.62(2021 年 10 月(确实宣布:
复制多个问题
现在,您可以在"问题"视图中选择并复制多个问题。
通过选择您需要的所有问题,您现在可以在一个操作中复制它们,而无需安装任何插件。
这在没有扩展名的 vscode 中仍然是不可能的。 所以我发表了一个:
问题:复制
您可以复制工作区或当前文件中的所有问题。 可以过滤这些以包含/排除Errors/Warnings/Informations/Hints
。
示例键绑定:
{
"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 或简单输出中使用哪些字段?