Skip to content

Commit fe9b749

Browse files
brunoborgesCopilot
andauthored
Add Maven compiler problem matcher for javac diagnostics (#1086)
The javac problem matcher only recognized javac's native diagnostic format (File.java:12: warning: msg), which works for plain javac and Gradle but not Maven. The maven-compiler-plugin reformats diagnostics to [WARNING] /path/File.java:[12,5] msg, so Maven builds produced zero annotations. Add a new maven-javac matcher owner that recognizes the Maven format, capturing severity, file, line, column, and message. Maven builds now annotate consistently with Gradle and plain javac. Fixes: #1085 Co-authored-by: Copilot App <[email protected]>
1 parent 4db08ef commit fe9b749

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎.github/java.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@
2121
"message": 4
2222
}
2323
]
24+
},
25+
{
26+
"owner": "maven-javac",
27+
"pattern": [
28+
{
29+
"regexp": "^\\[(WARNING|ERROR)\\]\\s+(.+?\\.java):\\[(\\d+),(\\d+)\\]\\s+(.+)$",
30+
"severity": 1,
31+
"file": 2,
32+
"line": 3,
33+
"column": 4,
34+
"message": 5
35+
}
36+
]
2437
}
2538
]
2639
}

0 commit comments

Comments
 (0)