问题标签 [errorformat]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
73 浏览

vim - vim:errorformat 无法理解如何为我的解析器处理错误

我有一个解析器,它输出这种消息:

我尝试使用以下错误格式对其进行解析:

但它什么都不匹配。有人可以帮我指出我做错了什么吗?

谢谢。


编辑 2017-06-21:AsyncRun build :我使用(使用https://github.com/skywind3000/asyncrun.vim插件)运行我的构建命令(这是一个自定义脚本)。该插件只需异步运行命令并将其输出重定向到 quickfix。

症状是 quickfix 窗口包含的消息没有被识别为错误消息。

set errorformat包含我添加的定义。

0 投票
1 回答
81 浏览

php - 使 psalm 输出适应 Neomake

我正在尝试提出正确的错误格式以传递给 Neomake,以处理来自 psalm ( https://github.com/vimeo/psalm ) 的输出。

示例输出:

(双条仅在:lopen列表中可见,在控制台中不可见。不知道为什么。)

我试过的错误格式:

不知道我错过了什么。感谢任何提示或链接或其他任何东西。

0 投票
1 回答
179 浏览

vim - Vim 错误格式字符串以在 QuickFix 中显示消息,删除其中的一部分

我正在写一个errorformat字符串,它在大多数情况下都有效。我的问题是我有这样的行作为makeprg输出:

^M是的,该行以我要删除的虚假字符结尾。所以,我在我的 QuickFix 窗口中想要的是这个,没有^M字符:

但我有这个:

到目前为止,这是我的相关部分errorformat

我已经测试过,但没有成功,如下所示:

但它会引发错误(不是来自^M字面控制-M char,而不是插入符号后跟 M)。

显然该解决方案没有使用%G,但我在这里不知所措。

如何从此处的行中删除行尾字符?而且,删除首字母||会是一个加号,但我认为在 Vim 中是不可能的。

提前致谢!

编辑以使输入文本的外观更清晰

0 投票
1 回答
116 浏览

vim - 快速修复的自定义错误格式

我有一条错误消息,例如

如何仅解析错误部分中的内容。我想要被some text忽略的。

现在对于我正在使用的错误格式

0 投票
1 回答
278 浏览

vim - 设置由 ghcide 生成的多行错误消息的错误格式

我正在尝试设置 errorformatghcide ,它产生以下输出。

有以下内容~/.vim/compiler/ghcide.vim

Quickfix 缓冲区仅显示剩余的四行:

由于我自己无法弄清楚如何将上述多行消息映射到单个clist条目中,因此我正在寻求帮助。

0 投票
1 回答
79 浏览

firebase - PlatformException(ERROR_INVALID_EMAIL,电子邮件地址格式错误。,null)

我在一个项目中工作并使用 Firebase 进行身份验证,所以当我运行代码时,它返回一个名为(PlatformException(ERROR_INVALID_EMAIL,电子邮件地址格式错误。,null))的错误,这是我的代码:需要你的帮助来解决问题。

0 投票
1 回答
56 浏览

vim - 需要 vim 错误格式的 %s 示例

这看起来像一个简单的问题,有人知道 %s 对 VIM 中的 errorformat 选项意味着什么吗?vim 中的帮助文本对我来说不是很清楚,我需要一个例子来理解它。

0 投票
1 回答
70 浏览

vim - vim: is there a way to preprocess a file opened by copen

I'm trying to use errorformat to shorten the code-compile-code loop. My setup is such:

  1. MacOS where my editor (vim) sits. Along with git, etc. Everything except the compiler (VCS).
  2. A Ubuntu VM that runs on the same computer.
  3. A folder that's shared between the two. It mounts as ~/projects/my_proj on MacOS and /media/psf/projects/my_proj on the VM.

My workflow:

  1. Edit code on MacOS.
  2. Send SSH command to VM to compile the code and dump the results in /media/psf/projects/my_proj/results:
  1. Examine results of log and edit errors.

In step #3 of the workflow above, I would like to use quickfix to scan the log file. I've found that :cfile works to load the file.

However, the compiler on the VM writes out file paths using the absolute path:

When I try to read this into vim on MacOS, /media/psf/projects doesn't exist. And vim cannot display the errors.

What would be the best way (vimscript? macro?) that I can preprocess the log file (replace all folder paths), spit out an intermediate logfile and run :cfile on that?