Skip to main content

Questions tagged [errorformat]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
68 views

Trying to create syntax checking for Perl

I would like to have a quick way to check the syntax of the current Perl file. Suppose we have following incorrect file: #!/usr/bin/perl sub aaa { dfgdf dfgdfg if ) {} sub bbb { } ...
user4035's user avatar
  • 179
0 votes
1 answer
87 views

Error when adding new string to errorformat in init.lua?

In Neovim I want to jump through Python traceback in the quickfix list. To do that, I set the following option :set errorformat+=%.%#File\ \"%f\"\\,\ line\ %l%.%# and this works well. What ...
Fabz's user avatar
  • 1
1 vote
2 answers
42 views

How can I reload the contents of my quickfix, but with a different errorformat?

I use :make to run a python script to build a C++ project. Usually, the output errors are C++ errors and :compiler msvc parses them correctly. Rarely, the error is a python one and I want :compiler ...
idbrii's user avatar
  • 661
0 votes
0 answers
29 views

How do I make a word optional in an errorformat?

What's the syntax for optional tokens in an 'errorformat'? Details Using Visual Studio, I have a compiler/msvc.vim setup like this: CompilerSet errorformat& CompilerSet errorformat^=%f(%l):\ %...
idbrii's user avatar
  • 661
1 vote
1 answer
449 views

How to correctly set up :make for building Vim?

My question could fairly be a duplicate of this, but I hope I'm making it critically different by asking about :makeing Vim itself and having a meaningful quickfix window. (In reality, my use case is ...
Enlico's user avatar
  • 2,224
6 votes
1 answer
239 views

How to ignore beginning of line in errorformat

I have error or warning messages from some tool with the following format: 2022-08-18T21:25:01.972 WARNING ##] file:///Users/myuser/somedir/file.txt:123: Error: something went wrong One of the built-...
lelgetrekt's user avatar
0 votes
2 answers
186 views

Translate file paths in quickfix list

I'm using msys + vim + ninja + MSVC on windows. When building, the quickfix list has errors that use the windows path, ie c:\work\folder\file.cpp Vim handles it ok-ish, it can open the files, but ...
user92979's user avatar
  • 101
1 vote
1 answer
226 views

How to add custom errorformat at the beginning of the list

I added a custom errorformat in my .vimrc like this: set errorformat+=ERROR:\ %f:%l:%c:\ error:\ %m However, this doesn't work because an already existing format is matched first (incorrectly). In ...
lelgetrekt's user avatar
1 vote
1 answer
75 views

What does "any scanf non-assignable conversion" mean?

:help errorformat lists the basic items supported in 'errorformat' and one of them is: %*{conv} any scanf non-assignable conversion What does that mean and how can I use it? The fscanf ...
idbrii's user avatar
  • 661
1 vote
1 answer
39 views

How to match two parts of error message and concatenate them?

I try to read :h errorformat: %m error message (finds a string) I try to read it, but I practically found that it's impossible to specify %m twice: E372: Too many %m in format string I ...
KamilCuk's user avatar
  • 265
1 vote
1 answer
130 views

Change Directory with Errorformat

I'm trying to write an errorformat for JUnit. Directory structure from cwd is: unsw/piazza/PiazzaForum.java unsw/piazza/Thread.java unsw/test/PiazzaTest.java Amongst all the cruft outputted by JUnit, ...
Edward Chamberlain's user avatar
1 vote
0 answers
89 views

How to integrate GCC's fix-it hints into a vim-based workflow?

Modern GCC provides the -fdiagnostics-generate-patch flag: Options to Control Diagnostic Messages Formatting [...] -fdiagnostics-generate-patch Print fix-it hints to stderr in ...
PiCTo's user avatar
  • 369
0 votes
2 answers
139 views

vim get error properly formatted in quickfix

Please find my minimal vimrc (whatever I use for Latex compilation) "General "{{{ set nocompatible " because vim is not vi "set autowrite ...
BaRud's user avatar
  • 491
1 vote
0 answers
60 views

Keep matched filename, line number and column number in the error message

I'm currently trying to create some errorformat rules to parse the output of the black formatter. The output of this formatter is as follows: would reformat /home/ricks/Development/personal/...
rickstaa's user avatar
  • 133
4 votes
1 answer
799 views

Import an error file to the quickfix list without leaving vim

I know that the quickfix list is very useful for the edit-compile-edit cycle. I like the fact that we can jump directly to an error from it. Actually I am trying to understand the way I can parse a ...
Fabrice Hategekimana's user avatar
2 votes
1 answer
454 views

Ignore lines with string in errorformat

I'm writing a GitHub action that creates an annotation for files that would be reformatted when the black python formatter is run. For this, to work, I want to parse the following example output: ...
rickstaa's user avatar
  • 133
0 votes
1 answer
103 views

Not recognising "In file included from"

I'm using the default errorformat, but messages starting with "In file included from" aren't giving me the quickfix output I expect For example: || [ 0%] Building CXX object CMakeFiles/blah/...
Len has moved to Codidact's user avatar
0 votes
1 answer
68 views

error not formatted as per efm

I have created a mwe plugin to show my problem for fortran ft. tree ftrial ftrial ├── autoload │   └── makes.vim └── ftplugin └── fortran_mk.vim with cat ftrial/autoload/makes.vim " ...
BaRud's user avatar
  • 491
4 votes
1 answer
312 views

`errorformat` pattern for multiple messages on same line

I am trying to set errorformat=... so that I can parse errors like the following: error: cannot format /home/user/repo/src/file1.py: Cannot parse: 2:5: some source code here error: cannot format /home/...
Jasha's user avatar
  • 513
0 votes
1 answer
39 views

Quickfix stack doesn't work when using make -j

As mentioned in other questions, using make -C buildpath as makeprg in Vim and the appropriate errorformat triggers the nice handling of the quickfix directory stack. That is, the quickfix uses the "...
Albert Gil Moreno's user avatar
5 votes
1 answer
587 views

Vim errorformat to parse output with ANSI color codes [duplicate]

I try to parse output with ANSI codes and I can't cope with definition errorformat. Example output: ^[[0;31;49mtestdata/examples.rb:3^[[0m Array#shuffle.first is slower than Array#sample.$ After ...
vk26's user avatar
  • 161
2 votes
0 answers
302 views

Configuring Multiple Compiler Plugins in a Single Project

Vim has compiler plugin feature which enables the user to write a compiler configuration, and then running :make will trigger the command, and errorformat will parse the output and will print any ...
Husain's user avatar
  • 285
1 vote
1 answer
323 views

Multiline errorformat

I would like to parse the latex log to extract warnings from the refcheck package. These warnings look like this Package refcheck Warning: Unused label `eq:my_equation_label' on input line 2 28. The ...
Rastapopoulos's user avatar
2 votes
1 answer
1k views

Ignore lines in errorformat

I am writing a compiler plugin for eslint. It mostly works, but I want to ignore some lines in the output and am unsure how. I'm using the eslint "unix" format, which outputs errors like so: /Users/...
bronzehedwick's user avatar
3 votes
1 answer
356 views

Errorformat for jest output

I'm trying to configure vim to understand the jest output error format to be able to include it in the quickfix list. Although it does work partly (at least getting the file name and line/column ...
user2599672's user avatar
2 votes
1 answer
638 views

How to set up compiler globally?

In my vimrc, I have a compiler myCompiler. When the editor starts up, everything is fine. When I switch to a new file, the compiler settings (makeprg and errorformat) revert to their defaults. How ...
anon's user avatar
  • 33
0 votes
1 answer
715 views

Errorformat not recognizing my errors

I have errors which looks like this: [Error] Z:\absolute\file\path.cpp(42): error C2065: 'foo': undeclared identifier [Info] Z:\another\file\path.cpp(42): error C2050: 'foo': switch expression not ...
anon's user avatar
  • 33
6 votes
1 answer
2k views

need help with vim errorformat to parse multi-line make (gcc) output

I'm struggling to get vim (8.0 (2016 Sep 12)) to parse the output of my build system, and need help with defining my errorformat. The default gcc efm appears to not be matching any lines, so in ...
timblaktu's user avatar
  • 181
0 votes
1 answer
79 views

errorformat: can't understand how to handle error for my parser

I have a parser which output this kind of messages: || Error: M:\workdir\MyFile.ja: line 38: "Blablabla" has no license declaration || Error: M:\workdir\MyFile.ja: unknown attribute "blabla" |...
fievel's user avatar
  • 393
3 votes
1 answer
542 views

More error context in the QuickFix window?

The output of certain compilers (e.g., LaTeX) is incredibly difficult to parse using an error format string. There are always edge cases that leave out the context of errors. So, is there any way I ...
B215826's user avatar
  • 131
3 votes
1 answer
1k views

What does an at sign (@) do in a VIM errorformat string - I can't figure out the example from VIM's docs

The below example, straight out of the VIM documentation, uses an "at sign" yet nowhere else in the entire document is it mentioned or explained. Another example: Think of a Python interpreter that ...
CrashNeb's user avatar
  • 203
9 votes
1 answer
2k views

Print an error message without "Error detected while processing function"

If I type: :echoerr "test error" I simply get the message printed (with red background): test error However, inside a function: function! Printerror() echoerr "test error" endfunction I get ...
Tom Hale's user avatar
  • 2,711
3 votes
2 answers
364 views

`'errorformat'` incorrectly matching file name

Consider the following 'errorformat' configuration: set errorformat=%f:%l:\ %m And the following message: %Warning-ASSIGNDLY: test.v:1: Unsupported: Ignoring delay. While I expected that this ...
Vitor's user avatar
  • 1,752
4 votes
1 answer
253 views

errorformat for Java junit output

I am trying to get VIM to jump to the file listed in the error. So the following is the error. || 1) test01(ErrorTest0) || java.lang.NullPointerException || at Line.equals(Line.java:43) || at ...
user1135541's user avatar
  • 1,113
1 vote
1 answer
339 views

Jump to linker errors in quickfix

How can I make linker errors jumpable in quickfix? Example: int foo(void); int main(int argc, char* argv[]) { foo(); } Start up vim and run :set makeprg=gcc\ % and try :make. This produces a ...
Praxeolitic's user avatar
  • 2,478
1 vote
1 answer
143 views

How to merge multiple strings in errorformat?

Suppose a source code interpreter outputs the error messages in the following format: M123 Warning path/to/file 123 Description message That is: error_code error_type file line_number message How ...
Vitor's user avatar
  • 1,752