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

标签 compiler-errors visual-studio-code export

是否有机会将所有编译错误和警告从 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/

相关文章:

ruby - 在 CentOS 64 位上的 Ruby 1.9.2 中安装 ruby​​gem 'mysql2' 时出现编译器错误

java - 找不到类型扫描仪的符号变量键盘

python - 为什么我在尝试导入 JSON 时收到 IntegrityError?

pdf - 无法再为某些用户从 Google Sheets 电子表格生成 PDF

visual-studio-code - VSCode 中有项目经理吗?

ms-access - Access 查询不带列名的 txt 文件。

java - 需要添加一个 add 方法,但每次都会收到不同的错误,我不知道其含义

c# - 方法 `HideToast'的重载不带有 `0'参数

visual-studio-code - javascript 调试终端不断使用 powershell 而不是 git bash 打开

python - 使用 python 日志模块在 VS Code 中没有输出