Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[JENKINS-6971] Correctly parse relative paths in Doxygen error messages.
  • Loading branch information
uhafner committed Nov 30, 2011
1 parent 08565b8 commit b06a0558ce00a8d6ae23dff6657eb6b7263b7fbf
Showing 3 changed files with 12 additions and 3 deletions.
@@ -56,7 +56,7 @@ public class DoxygenParser extends RegexpDocumentParser {
* (.+(?:\\n[^/<\\n][^:\\n][^\\\\\\n].+)*
* */
private static final String DOXYGEN_WARNING_PATTERN =
"^(?:(?:((?:/|[A-Za-z]:).+?):(-?\\d+):\\s*([Ww]arning|[Ee]rror)|<.+>:-?\\d+(?::\\s*([Ww]arning|[Ee]rror))?): (.+(?:\\n[^/<\\n][^:\\n][^/\\n].+)*)|([Nn]otice|[Ww]arning|[Ee]rror): (.+))$";
"^(?:(?:((?:[/.]|[A-Za-z]:).+?):(-?\\d+):\\s*([Ww]arning|[Ee]rror)|<.+>:-?\\d+(?::\\s*([Ww]arning|[Ee]rror))?): (.+(?:\\n[^/<\\n][^:\\n][^/\\n].+)*)|\\s*([Nn]otice|[Ww]arning|[Ee]rror): (.+))$";

/** The index of the regexp group capturing the file name (when the warning occurs in a file). */
private static final int FILE_NAME_GROUP = 1;
@@ -160,7 +160,7 @@ public void issue7178() throws IOException {
}

/**
* Parses a warning log with 2 doxygen 1.7.1 messages.
* Parses a warning log with 3 doxygen 1.7.1 messages.
*
* @throws IOException
* if the file could not be read
@@ -170,7 +170,7 @@ public void issue7178() throws IOException {
public void issue6971() throws IOException {
Collection<FileAnnotation> warnings = new DoxygenParser().parse(openFile("issue6971.txt"));

assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 2, warnings.size());
assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 3, warnings.size());
Iterator<FileAnnotation> iterator = warnings.iterator();
checkWarning(iterator.next(),
479,
@@ -182,6 +182,11 @@ public void issue6971() throws IOException {
"Unexpected character `\"'",
"/home/user/myproject/helper/SimpleTimer.h",
WARNING_TYPE, WARNING_CATEGORY, Priority.HIGH);
checkWarning(iterator.next(),
357,
"Member getInternalParser() (function) of class XmlParser is not documented.",
".../XmlParser.h",
WARNING_TYPE, WARNING_CATEGORY, Priority.NORMAL);
}


@@ -1,2 +1,6 @@
/home/user/myproject/helper/LCPcalc.cpp:479:warning: the name `lcp_lexicolemke.c' supplied as the second argument in the \file statement is not an input file
/home/user/myproject/helper/SimpleTimer.h:19:error: Unexpected character `"'

.../XmlParser.h:357: warning: Member getInternalParser() (function) of class XmlParser is not documented.


0 comments on commit b06a055

Please sign in to comment.