Skip to content

Commit

Permalink
improve regex to detect and extract CMake warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Jun 22, 2017
1 parent cc86566 commit c14135d
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
<groovyParsers>
<hudson.plugins.warnings.GroovyParser>
<name>CMake</name>
<regexp>^CMake (Deprecation Warning|Warning|Warning \(dev\)|Error) at (.+):(\d+) \((.+)\):\n( .+\n)?(.+\n( .+\n)*)?</regexp>
<regexp>^CMake (Deprecation Warning|Warning|Warning \(dev\)|Error) at (.+):(\d+)( \((.+)\))?:\n( .+\n)?(.+\n( .+\n)*)?</regexp>
<script>import hudson.plugins.analysis.util.model.Priority
import hudson.plugins.warnings.parser.Warning

String messageType = matcher.group(1)
String fileName = matcher.group(2)
String lineNumber = matcher.group(3)
String scope = matcher.group(4)
String cmakeMessage = matcher.group(5)
String callStack = matcher.group(6)
String scope = matcher.group(5)
String cmakeMessage = matcher.group(6)
String callStack = matcher.group(7)

if (!scope) {
scope = &quot;global&quot;
}

String message = &quot;&quot;
if (cmakeMessage) {
Expand Down

0 comments on commit c14135d

Please sign in to comment.