如何将所有编译错误和警告从 VSCode 问题视图导出到 txt/excel 或类似文件?

Dmi*_*son 7 compiler-errors export visual-studio-code

是否有机会将所有编译错误和警告从 VSCode 的问题视图导出为某种表格格式?

如果错误数量很大,那么在 VSCode 之外的某个地方分析它们会很有用。

Mar*_*ark 2

如果没有扩展,这在 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
  }
}
Run Code Online (Sandbox Code Playgroud)

输出将添加到剪贴板。示例输出:

[
    {
        "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
    }
]
Run Code Online (Sandbox Code Playgroud)

我计划生成更简单的输出,包括 csv 版本。您想要 csv 或简单输出中的哪些字段?