Skip to content

Commit 8bae55b

Browse files
authored
Merge pull request #81 from malcolmr/add-buildifier-test
Add a test for error reporting for buildifier.
2 parents 1552a16 + 1b5f655 commit 8bae55b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

vroom/buildifier.vroom

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,22 @@ The bzl filetype will use the buildifier formatter by default.
5252
$ )
5353

5454
:set filetype=
55+
56+
Errors are reported using the quickfix list.
57+
58+
@clear
59+
% #<CR>
60+
% java_package(])
61+
62+
:FormatCode buildifier
63+
! buildifier .*2> (.*)
64+
$ echo 'stdin:2:15: syntax error near ]' >\1 (command)
65+
$ 1 (status)
66+
#
67+
java_package(])
68+
@end
69+
:echomsg line('.') . ',' . col('.')
70+
~ 2,15
71+
:echomsg string(map(getqflist(),
72+
|'v:val.lnum . "," . v:val.col . "," . v:val.text'))
73+
~ ['2,15,syntax error near ]']

0 commit comments

Comments
 (0)