Skip to content

Commit 74b4f92

Browse files
Konfektchrisbra
authored andcommitted
runtime(compiler): set errorformat where missing
As a matter of caution it sets it to the default gcc errorformat: ``` errorformat=%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-Gg%\?make[%*\d]: *** [%f:%l:%m,%-Gg%\?make: *** [%f:%l:%m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory %*[`']%f',%X%*\a[%*\d]: Leaving directory %*[`']%f',%D%*\a: Entering directory %*[`']%f',%X%*\a: Leaving directory %*[`']%f',%DMaking %*\a in %f,%f|%l| %m ``` so that the compiler keeps working after switching to others. While likely only a subset is needed; such a subset has been proposed in a commented errorformat; checked to work for yamllint but ran out of steam for other compilers; closes: #18754 Signed-off-by: Konfekt <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent d128850 commit 74b4f92

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

runtime/compiler/rime_deployer.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
" Maintainer: Wu, Zhenyu <[email protected]>
44
" URL: https://rime.im
55
" Latest Revision: 2024-04-09
6+
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
67

78
if exists('b:current_compiler')
89
finish
@@ -25,6 +26,8 @@ for s:shared_data_dir in ['/sdcard/rime-data', '/run/current-system/sw/share/rim
2526
endfor
2627
execute 'CompilerSet makeprg=rime_deployer\ --build\ %:p:h:S\' s:shared_data_dir
2728
unlet s:prefix s:shared_data_dir
29+
" CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m
30+
CompilerSet errorformat&
2831

2932
let &cpoptions = s:save_cpoptions
3033
unlet s:save_cpoptions

runtime/compiler/vimdoc.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
" Language: vimdoc
33
" Maintainer: Wu, Zhenyu <[email protected]>
44
" Latest Revision: 2024-04-13
5+
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
56
"
67
" If you can not find 'vimdoc' in the package manager of your distribution e.g
78
" 'pip', then you may need to build it from its source.
@@ -15,6 +16,8 @@ let s:save_cpoptions = &cpoptions
1516
set cpoptions&vim
1617

1718
CompilerSet makeprg=vimdoc
19+
" CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m
20+
CompilerSet errorformat&
1821

1922
let &cpoptions = s:save_cpoptions
2023
unlet s:save_cpoptions

runtime/compiler/yamllint.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
" Maintainer: Romain Lafourcade <[email protected]>
44
" Last Change: 2021 July 21
55
" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
6+
" 2025 Nov 16 by The Vim Project (set errorformat)
67

78
if exists("current_compiler")
89
finish
910
endif
1011
let current_compiler = "yamllint"
1112

1213
CompilerSet makeprg=yamllint\ -f\ parsable
14+
" CompilerSet errorformat=%f:%l:%c:\ [%t%*[^]]]\ %m,%f:%l:%c:\ [%*[^]]]\ %m
15+
CompilerSet errorformat&
1316

runtime/compiler/zig_build_exe.vim

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim compiler file
22
" Compiler: Zig Compiler (zig build-exe)
33
" Upstream: https://github.com/ziglang/zig.vim
4-
" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition)
4+
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
55

66
if exists('current_compiler')
77
finish
@@ -12,11 +12,9 @@ let current_compiler = 'zig_build_exe'
1212
let s:save_cpo = &cpo
1313
set cpo&vim
1414

15-
if has('patch-7.4.191')
16-
CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
17-
else
18-
CompilerSet makeprg=zig\ build-exe\ \"%\"\ \$*
19-
endif
15+
CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
16+
" CompilerSet errorformat=%f:%l:%c: %t%*[^:]: %m, %f:%l:%c: %m, %f:%l: %m
17+
CompilerSet errorformat&
2018

2119
let &cpo = s:save_cpo
2220
unlet s:save_cpo

runtime/compiler/zig_test.vim

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim compiler file
22
" Compiler: Zig Compiler (zig test)
33
" Upstream: https://github.com/ziglang/zig.vim
4-
" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition)
4+
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
55

66
if exists('current_compiler')
77
finish
@@ -12,11 +12,9 @@ let current_compiler = 'zig_test'
1212
let s:save_cpo = &cpo
1313
set cpo&vim
1414

15-
if has('patch-7.4.191')
16-
CompilerSet makeprg=zig\ test\ \%:S\ \$*
17-
else
18-
CompilerSet makeprg=zig\ test\ \"%\"\ \$*
19-
endif
15+
CompilerSet makeprg=zig\ test\ \%:S\ \$*
16+
" CompilerSet errorformat=%f:%l:%c: %t%*[^:]: %m, %f:%l:%c: %m, %f:%l: %m
17+
CompilerSet errorformat&
2018

2119
let &cpo = s:save_cpo
2220
unlet s:save_cpo

0 commit comments

Comments
 (0)