Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-6971] Correctly parse relative paths in Doxygen error messages.
  • Loading branch information
uhafner committed Nov 30, 2011
1 parent 08565b8 commit b06a055
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Expand Up @@ -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;
Expand Down
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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);
}


Expand Down
@@ -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.