Class GrepParser
java.lang.Object
io.jenkins.plugins.analysis.core.model.Tool
io.jenkins.plugins.analysis.warnings.GrepParser
- All Implemented Interfaces:
Describable<Tool>,Serializable
Provides a simple grep-style file scanner that searches for occurrences of a configurable regular expression
in the workspace files and reports each matching line as an issue.
- Author:
- Akash Manna
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDescriptor for this static analysis tool.Nested classes/interfaces inherited from class io.jenkins.plugins.analysis.core.model.Tool
Tool.ToolDescriptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the Ant file-set pattern of files to exclude from scanning.Returns the Ant file-set pattern of files to scan.Returns the optional message template for matched issues.Returns the regular expression used to match lines.Returns the severity to assign to matched issues.edu.hm.hafner.analysis.Reportscan(Run<?, ?> run, FilePath workspace, Charset sourceCodeEncoding, io.jenkins.plugins.util.LogHandler logger) Scans the results of a build for issues.voidsetExcludePattern(String excludePattern) Sets the Ant file-set pattern of files to exclude from scanning.voidsetIncludePattern(String includePattern) Sets the Ant file-set pattern of files to scan.voidsetMessage(String message) Sets an optional message template for matched issues.voidSets the regular expression used to match lines.voidsetSeverity(String severity) Sets the severity to assign to matched issues.Methods inherited from class io.jenkins.plugins.analysis.core.model.Tool
getActualId, getActualName, getDescriptor, getIcon, getId, getLabelProvider, getName, getSymbolName, readResolve, setIcon, setId, setJenkinsFacade, setName
-
Constructor Details
-
GrepParser
@DataBoundConstructor public GrepParser()Creates a new instance ofGrepParser.
-
-
Method Details
-
getIncludePattern
Returns the Ant file-set pattern of files to scan.- Returns:
- Ant file-set pattern of files to scan
-
setIncludePattern
Sets the Ant file-set pattern of files to scan.- Parameters:
includePattern- Ant file-set pattern of files to scan
-
getExcludePattern
Returns the Ant file-set pattern of files to exclude from scanning.- Returns:
- Ant file-set pattern of files to exclude
-
setExcludePattern
Sets the Ant file-set pattern of files to exclude from scanning.- Parameters:
excludePattern- Ant file-set pattern of files to exclude
-
getRegexp
Returns the regular expression used to match lines.- Returns:
- the regular expression
-
setRegexp
Sets the regular expression used to match lines.- Parameters:
regexp- the regular expression
-
getMessage
Returns the optional message template for matched issues. When blank, the matched line is used as-is.- Returns:
- the message template (may be empty)
-
setMessage
Sets an optional message template for matched issues.- Parameters:
message- the message template
-
getSeverity
Returns the severity to assign to matched issues.- Returns:
- the severity name (one of
Severity.ERROR,Severity.WARNING_HIGH,Severity.WARNING_NORMAL,Severity.WARNING_LOW)
-
setSeverity
Sets the severity to assign to matched issues.- Parameters:
severity- the severity name
-
scan
public edu.hm.hafner.analysis.Report scan(Run<?, ?> run, FilePath workspace, Charset sourceCodeEncoding, io.jenkins.plugins.util.LogHandler logger) Description copied from class:ToolScans the results of a build for issues. This method is invoked on Jenkins master. I.e., if a tool wants to process some build results, it is required to run aMasterToSlaveCallable.
-