Skip to content

Commit 3beac9a

Browse files
committed
shfmt: add test for error showing up in quickfix.
1 parent e5b1594 commit 3beac9a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

vroom/shfmt.vroom

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,22 @@ You can format any buffer with shfmt specifying the formatter explicitly.
4949
fi
5050
@end
5151

52+
Errors are reported using the quickfix list.
53+
54+
@clear
55+
% foo() {
56+
57+
:FormatCode shfmt
58+
! shfmt .*2>.*
59+
foo() {
60+
@end
61+
:echomsg line('.') . ',' . col('.')
62+
~ 1,7
63+
:echomsg string(map(getqflist(),
64+
|'v:val.lnum . "," . v:val.col . "," . v:val.text'))
65+
~ ['1,7,reached EOF without matching { with }']
66+
67+
5268
The sh filetype will use the shfmt formatter by default.
5369

5470
@clear

0 commit comments

Comments
 (0)