Class ReportScanningTool
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Tool>
-
- io.jenkins.plugins.analysis.core.model.Tool
-
- io.jenkins.plugins.analysis.core.model.ReportScanningTool
-
- All Implemented Interfaces:
Describable<Tool>
,Serializable
- Direct Known Subclasses:
AnalysisModelParser
,GroovyScript
,RegisteredParser
public abstract class ReportScanningTool extends Tool
Describes a static analysis tool that reports issues by scanning a report file. Report files are identified using an Ant style pattern.- Author:
- Ullrich Hafner
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReportScanningTool.ReportScanningToolDescriptor
Descriptor forReportScanningTool
.-
Nested classes/interfaces inherited from class io.jenkins.plugins.analysis.core.model.Tool
Tool.ToolDescriptor
-
-
Constructor Summary
Constructors Constructor Description ReportScanningTool()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract edu.hm.hafner.analysis.IssueParser
createParser()
Returns a new parser to scan a log file and return the issues reported in such a file.String
getActualPattern()
Returns the actual pattern to work with.ReportScanningTool.ReportScanningToolDescriptor
getDescriptor()
String
getPattern()
String
getReportEncoding()
boolean
getSkipSymbolicLinks()
edu.hm.hafner.analysis.Report
scan(Run<?,?> run, FilePath workspace, Charset sourceCodeEncoding, LogHandler logger)
Scans the results of a build for issues.void
setPattern(String pattern)
Sets the Ant file-set pattern of files to work with.void
setReportEncoding(String reportEncoding)
Sets the encoding to use to read the log files that contain the warnings.void
setSkipSymbolicLinks(boolean skipSymbolicLinks)
Specify if file scanning skip traversal of symbolic links.-
Methods inherited from class io.jenkins.plugins.analysis.core.model.Tool
getActualId, getActualName, getId, getLabelProvider, getName, getSymbolName, setId, setName
-
-
-
-
Method Detail
-
setPattern
@DataBoundSetter public void setPattern(String pattern)
Sets the Ant file-set pattern of files to work with. If the pattern is undefined then the console log is scanned.- Parameters:
pattern
- the pattern to use
-
getPattern
@CheckForNull public String getPattern()
-
getActualPattern
public String getActualPattern()
Returns the actual pattern to work with. If no user defined pattern is given, then the default pattern is returned.- Returns:
- the name
- See Also:
setPattern(String)
,AnalysisModelParser.AnalysisModelParserDescriptor.getPattern()
-
getDescriptor
public ReportScanningTool.ReportScanningToolDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Tool>
- Overrides:
getDescriptor
in classTool
-
createParser
public abstract edu.hm.hafner.analysis.IssueParser createParser()
Returns a new parser to scan a log file and return the issues reported in such a file.- Returns:
- the parser to use
-
setSkipSymbolicLinks
@DataBoundSetter public void setSkipSymbolicLinks(boolean skipSymbolicLinks)
Specify if file scanning skip traversal of symbolic links.- Parameters:
skipSymbolicLinks
- if symbolic links should be skipped during directory scanning.
-
getSkipSymbolicLinks
public boolean getSkipSymbolicLinks()
-
setReportEncoding
@DataBoundSetter public void setReportEncoding(String reportEncoding)
Sets the encoding to use to read the log files that contain the warnings.- Parameters:
reportEncoding
- the encoding, e.g. "ISO-8859-1"
-
getReportEncoding
@CheckForNull public String getReportEncoding()
-
scan
public edu.hm.hafner.analysis.Report scan(Run<?,?> run, FilePath workspace, Charset sourceCodeEncoding, LogHandler logger)
Description copied from class:Tool
Scans 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
.
-
-