Created
October 25, 2012 01:14
-
-
Save bryan-hunt/3949923 to your computer and use it in GitHub Desktop.
KeilRDK groovy script for Jenkins-Warnings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// KeilRDK error/warning parsing script for the Warnings plugin for Jenkins | |
// https://wiki.jenkins-ci.org/display/JENKINS/Warnings+Plugin | |
// | |
// Regular expression: | |
// ^(.+)\((\d+)\):\s*([A-Za-z]+):\s*#(\d+)-D:(.+)$ | |
// | |
import hudson.plugins.warnings.parser.Warning | |
import hudson.plugins.analysis.util.model.Priority | |
String fileName = matcher.group(1); | |
int lineNumber = Integer.parseInt(matcher.group(2)); | |
String type = matcher.group(3); | |
int errorCode = Integer.parseInt(matcher.group(4)); | |
String message = matcher.group(5); | |
Priority priority; | |
if (type.equalsIgnoreCase("error")) { | |
priority = Priority.HIGH; | |
} | |
else { | |
priority = Priority.NORMAL; | |
} | |
return new Warning(fileName, lineNumber, "KeilRDK", "KeilRDK Error", errorCode + " - " + message, priority); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@RakeshNagarajan if you notice this is from 7 years ago and was meant for use with the Warning Plugin at the time: https://wiki.jenkins.io/display/JENKINS/Warnings+Plugin which has been end of life'd in favor of https://wiki.jenkins.io/display/JENKINS/Warnings+Next+Generation+Plugin which as built in support for armcc. You might try to use that plugin by default to see if it works for you without having to use this gist.