This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIXED JENKINS-8833] Allow configuration of parsers for each file.
- Loading branch information
Showing
10 changed files
with
240 additions
and
108 deletions.
There are no files selected for viewing
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
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
46 changes: 46 additions & 0 deletions
46
src/main/java/hudson/plugins/warnings/ParserConfiguration.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package hudson.plugins.warnings; | ||
|
||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* Defines the configuration to parse a set of files using a predefined parser. | ||
* | ||
* @author Ulli Hafner | ||
*/ | ||
public class ParserConfiguration { | ||
private final String pattern; | ||
private final String parserName; | ||
|
||
/** | ||
* Creates a new instance of {@link ParserConfiguration}. | ||
* | ||
* @param pattern | ||
* the pattern of files to parse | ||
* @param parserName | ||
* the name of the parser to use | ||
*/ | ||
@DataBoundConstructor | ||
public ParserConfiguration(final String pattern, final String parserName) { | ||
this.pattern = pattern; | ||
this.parserName = parserName; | ||
} | ||
|
||
/** | ||
* Returns the name of the parser. | ||
* | ||
* @return the parser name | ||
*/ | ||
public String getParserName() { | ||
return parserName; | ||
} | ||
|
||
/** | ||
* Returns the file pattern. | ||
* | ||
* @return the pattern | ||
*/ | ||
public String getPattern() { | ||
return pattern; | ||
} | ||
} | ||
|
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
Oops, something went wrong.