Skip to content

Commit a3125c9

Browse files
committed
Modify quickfix errorformat for Gradle Error and Warning matches
- Fix match of the first Gradle error/warning in the format of `:proj:proj2:compile[Test]Java/path/file.java` - Extend match to detect column location - Remove extra line ignores (`-G`) since the last line will ignore all non-matching lines. - Separate the Gradle/Javac error line match to also detect "warnings"
1 parent f0e8db6 commit a3125c9

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

compiler/gradle.vim

+4-8
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ CompilerSet makeprg=gradle
1515
CompilerSet errorformat=
1616
\%E[ant:scalac]\ %f:%l:\ error:\ %m,
1717
\%W[ant:scalac]\ %f:%l:\ warning:\ %m,
18-
\%E:compileJava%f:%l:\ %m,
19-
\%E:compileTestJava%f:%l:\ %m,
20-
\%E%f:%l:\ %m,%-Z%p^,%-C%.%#,%-G%.%#,
18+
\%E%.%#:compile%.%#Java%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
19+
\%W%.%#:compile%.%#Java%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
20+
\%E%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
21+
\%W%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
2122
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
2223
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
23-
\%-G\\s%#,
24-
\%-GBUILD\ SUCCESSFUL#,
25-
\%-GTotal\ \time:\ %.%#,
26-
\%E%f:%l:\ %m,
2724
\%-G%.%#
28-

compiler/gradlew.vim

+4-8
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ CompilerSet makeprg=./gradlew
1515
CompilerSet errorformat=
1616
\%E[ant:scalac]\ %f:%l:\ error:\ %m,
1717
\%W[ant:scalac]\ %f:%l:\ warning:\ %m,
18-
\%E:compileJava%f:%l:\ %m,
19-
\%E:compileTestJava%f:%l:\ %m,
20-
\%E%f:%l:\ %m,%-Z%p^,%-C%.%#,%-G%.%#,
18+
\%E%.%#:compile%.%#Java%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
19+
\%W%.%#:compile%.%#Java%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
20+
\%E%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
21+
\%W%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
2122
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
2223
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
23-
\%-G\\s%#,
24-
\%-GBUILD\ SUCCESSFUL#,
25-
\%-GTotal\ \time:\ %.%#,
26-
\%E%f:%l:\ %m,
2724
\%-G%.%#
28-

0 commit comments

Comments
 (0)