[vim/vim] Ignore some Make output in errorformat (PR #12481)

68 views
Skip to first unread message

Gregory Anders

unread,
Jun 2, 2023, 11:27:52 AM6/2/23
to vim/vim, Subscribed

Problem: GNU Make issues messages such as

make[1]: *** [foo/bar/baz/Makefile:210] Error 1

The default 'errorformat' value matches these messages because of the
%f:%l:%m pattern, and creates quickfix list entries that appear valid
but create a new buffer named make[1]: *** [foo/bar/baz/Makefile,
which is obviously incorrect.

Solution: Add entries to 'errorformat' to ignore these messages.

The entries added are:

  1. %-Gg%\?make[%*\d]: *** [%f:%l:%m
  2. %-Gg%\?make: *** [%f:%l:%m

This covers all of the following cases:

make[1]: *** [foo/bar/baz/Makefile:200] Error 1
gmake[1]: *** [foo/bar/baz/Makefile:200] Error 1
make: *** [Makefile:114: all] Error 2
gmake: *** [Makefile:114: all] Error 2

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/12481

Commit Summary

  • ab93e35 Ignore some Make output in errorformat

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12481@github.com>

codecov[bot]

unread,
Jun 2, 2023, 11:41:06 AM6/2/23
to vim/vim, Subscribed

Codecov Report

Merging #12481 (ab93e35) into master (a109f39) will increase coverage by 0.64%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #12481      +/-   ##
==========================================
+ Coverage   82.08%   82.73%   +0.64%     
==========================================
  Files         160      150      -10     
  Lines      193589   180399   -13190     
  Branches    43465    40541    -2924     
==========================================
- Hits       158915   149257    -9658     
+ Misses      21827    18186    -3641     
- Partials    12847    12956     +109     
Flag Coverage Δ
huge-clang-none 82.73% <ø> (-0.01%) ⬇️
linux 82.73% <ø> (-0.01%) ⬇️
mingw-x64-HUGE ?
mingw-x86-HUGE ?
windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 142 files with indirect coverage changes


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12481/c1573943256@github.com>

Bram Moolenaar

unread,
Jun 3, 2023, 3:29:31 PM6/3/23
to vim/vim, Subscribed


> Problem: GNU Make issues messages such as
>
> make[1]: *** [foo/bar/baz/Makefile:210] Error 1
>
> The default 'errorformat' value matches these messages because of the
> %f:%l:%m pattern, and creates quickfix list entries that appear valid
> but create a new buffer named `make[1]: *** [foo/bar/baz/Makefile`,

> which is obviously incorrect.
>
> Solution: Add entries to 'errorformat' to ignore these messages.
>
> The entries added are:
>
> 1. `%-Gg%\?make[%*\d]: *** [%f:%l:%m`
> 2. `%-Gg%\?make: *** [%f:%l:%m`

>
> This covers all of the following cases:
>
> make[1]: *** [foo/bar/baz/Makefile:200] Error 1
> gmake[1]: *** [foo/bar/baz/Makefile:200] Error 1
> make: *** [Makefile:114: all] Error 2
> gmake: *** [Makefile:114: all] Error 2

Thanks, looks useful.

Can you add a test for this? The option value is rather complicated,
further additions may break this again. For an example look in
src/testdir/test_quickfix.vim, Test_efm1(). You can add a new function
to avoid cluttering the existing one. Essential is to keep the
"CheckUnix" line, since your change only is in the Unix default value.

--
In a world without walls and borders, who needs windows and gates?

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12481/c1575148158@github.com>

Gregory Anders

unread,
Jun 4, 2023, 10:39:04 AM6/4/23
to vim/vim, Push

@gpanders pushed 1 commit.

  • ebb0eb9 Update test_quickfix for new efm entry


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12481/push/13864150558@github.com>

Gregory Anders

unread,
Jun 4, 2023, 10:40:23 AM6/4/23
to vim/vim, Subscribed

There is actually already a line in the Test_efm1 error file like this:

    make: *** [vim] Error 1

I changed this to

    make: *** [src/vim/testdir/Makefile:100: test_quickfix] Error 1

which causes the test to fail on master, but passes with this patch applied. Hopefully that is sufficient.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12481/c1575594158@github.com>

Bram Moolenaar

unread,
Jun 5, 2023, 4:53:38 PM6/5/23
to vim/vim, Subscribed

Closed #12481 via d1911a8.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12481/issue_event/9438228028@github.com>

Erik Cervin Edin

unread,
Jan 31, 2024, 12:43:13 PM1/31/24
to vim/vim, Subscribed

I'm very excited by the prospect of not having make: *** [ buffers` created all the time it's been driving me insane.

But does this ignore the messages? Wouldn't the sane default by to not ignore the error, but match it and properly locate the error to the appropriate location (in the makefile)?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/12481/c1919598412@github.com>

Reply all
Reply to author
Forward
0 new messages