Klasse AnalysisResult
java.lang.Object
io.jenkins.plugins.analysis.core.model.AnalysisResult
- Alle implementierten Schnittstellen:
AnalysisBuildResult
,StaticAnalysisRun
,Serializable
Stores the results of a static analysis run. Provides support for persisting the results of the build and loading and
saving of issues (all, new, and fixed) and delta computation.
- Autor:
- Ullrich Hafner
- Siehe auch:
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungAnalysisResult
(Run<?, ?> owner, String id, DeltaReport report, io.jenkins.plugins.forensics.blame.Blames blames, io.jenkins.plugins.forensics.miner.RepositoryStatistics totals, io.jenkins.plugins.util.QualityGateResult qualityGateResult, Map<String, Integer> sizePerOrigin) Creates a new instance ofAnalysisResult
.protected
AnalysisResult
(Run<?, ?> owner, String id, DeltaReport report, io.jenkins.plugins.forensics.blame.Blames blames, io.jenkins.plugins.forensics.miner.RepositoryStatistics repositoryStatistics, io.jenkins.plugins.util.QualityGateResult qualityGateResult, Map<String, Integer> sizePerOrigin, boolean canSerialize) Creates a new instance ofAnalysisResult
.AnalysisResult
(Run<?, ?> owner, String id, DeltaReport report, io.jenkins.plugins.forensics.blame.Blames blames, io.jenkins.plugins.forensics.miner.RepositoryStatistics totals, io.jenkins.plugins.util.QualityGateResult qualityGateResult, Map<String, Integer> sizePerOrigin, AnalysisResult previousResult) Creates a new instance ofAnalysisResult
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungio.jenkins.plugins.forensics.blame.Blames
Returns the blames for the report.edu.hm.hafner.echarts.Build
getBuild()
int
org.eclipse.collections.api.list.ImmutableList
<String> Returns the error messages of the analysis run.edu.hm.hafner.analysis.Report
Returns all fixed issues of the associated static analysis run.int
Returns the number of fixed issues in this analysis run.io.jenkins.plugins.forensics.miner.RepositoryStatistics
Returns the repository statistics for the report.getId()
Returns the ID of the static analysis result.org.eclipse.collections.api.list.ImmutableList
<String> Returns the info messages of the analysis run.edu.hm.hafner.analysis.Report
Returns all issues of the associated static analysis run.int
Returns the number of new errors in this analysis run.int
Returns the number of new high-severity issues in this analysis run.edu.hm.hafner.analysis.Report
Returns all new issues of the associated static analysis run.int
Returns the number of new low-severity issues in this analysis run.int
Returns the number of new normal-severity issues in this analysis run.int
Returns the number of new issues in this analysis run.int
getNewSizeOf
(edu.hm.hafner.analysis.Severity severity) Returns the new number of issues in this analysis run that have the specifiedSeverity
.Returns the new number of issues in this analysis run, mapped bySeverity
.int
Returns the build number since the associated job has no issues.edu.hm.hafner.analysis.Report
Returns all outstanding issues of the associated static analysis run.Run
<?, ?> getOwner()
Returns the run that created this static analysis result.io.jenkins.plugins.util.QualityGateResult
Returns theQualityGateResult
of the quality gates evaluation of the static analysis run.io.jenkins.plugins.util.QualityGateStatus
Returns theQualityGateStatus
of the quality gates evaluation of the static analysis run.Returns the reference static analysis run that has been used to compute the new issues.Returns the number of issues in this analysis run, mapped by their origin.Returns the number of issues in this analysis run, mapped bySeverity
.int
Returns the build number since the associated job has a successful static analysis result.int
Returns the total number of errors in this analysis run.int
Returns the total number of high-severity issues in this analysis run.int
Returns the total number of low-severity issues in this analysis run.int
Returns the total number of normal severity issues in this analysis run.Returns the total number of issues (by severity, new, total, fixed and delta) in a build.int
Returns the total number of issues in this analysis run.int
getTotalSizeOf
(edu.hm.hafner.analysis.Severity severity) Returns the total number of issues in this analysis run that have the specifiedSeverity
.boolean
Check ifAnalysisResult
issues does not have any new warnings.boolean
isEmpty()
Check ifAnalysisResult
issues are empty (including new, outstanding and fixed).boolean
Returns whether the static analysis result is successful with respect to the definedQualityGateEvaluator
.protected Object
Called after de-serialization to retain backward compatibility.void
Sets the run for this result after Jenkins read its data from disk.toString()
-
Konstruktordetails
-
AnalysisResult
public AnalysisResult(Run<?, ?> owner, String id, DeltaReport report, io.jenkins.plugins.forensics.blame.Blames blames, io.jenkins.plugins.forensics.miner.RepositoryStatistics totals, io.jenkins.plugins.util.QualityGateResult qualityGateResult, Map<String, Integer> sizePerOrigin, AnalysisResult previousResult) Creates a new instance ofAnalysisResult
.- Parameter:
owner
- the current build as the owner of this actionid
- ID of the resultsreport
- the issues of this resultblames
- author and commit information for all issuestotals
- repository statistics for all issuesqualityGateResult
- the quality gate statussizePerOrigin
- the number of issues per originpreviousResult
- the analysis result of the previous run
-
AnalysisResult
public AnalysisResult(Run<?, ?> owner, String id, DeltaReport report, io.jenkins.plugins.forensics.blame.Blames blames, io.jenkins.plugins.forensics.miner.RepositoryStatistics totals, io.jenkins.plugins.util.QualityGateResult qualityGateResult, Map<String, Integer> sizePerOrigin) Creates a new instance ofAnalysisResult
.- Parameter:
owner
- the current build as the owner of this actionid
- ID of the resultsreport
- the issues of this resultblames
- author and commit information for all issuestotals
- repository statistics for all issuesqualityGateResult
- the quality gate statussizePerOrigin
- the number of issues per origin
-
AnalysisResult
protected AnalysisResult(Run<?, ?> owner, String id, DeltaReport report, io.jenkins.plugins.forensics.blame.Blames blames, io.jenkins.plugins.forensics.miner.RepositoryStatistics repositoryStatistics, io.jenkins.plugins.util.QualityGateResult qualityGateResult, Map<String, Integer> sizePerOrigin, boolean canSerialize) Creates a new instance ofAnalysisResult
.- Parameter:
owner
- the current run as the owner of this actionid
- ID of the resultsreport
- the issues of this resultblames
- author and commit information for all issuesrepositoryStatistics
- source code repository statistics for all issuesqualityGateResult
- the quality gate statussizePerOrigin
- the number of issues per origincanSerialize
- determines whether the result should be persisted in the build folder
-
-
Methodendetails
-
readResolve
Called after de-serialization to retain backward compatibility.- Gibt zurück:
- this
-
getBlames
public io.jenkins.plugins.forensics.blame.Blames getBlames()Returns the blames for the report.- Gibt zurück:
- the blames
-
getForensics
public io.jenkins.plugins.forensics.miner.RepositoryStatistics getForensics()Returns the repository statistics for the report.- Gibt zurück:
- the statistics
-
getId
Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns the ID of the static analysis result.- Angegeben von:
getId
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the ID
-
getOwner
Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns the run that created this static analysis result.- Angegeben von:
getOwner
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the run
-
setOwner
Sets the run for this result after Jenkins read its data from disk.- Parameter:
owner
- the initialized run
-
getErrorMessages
Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns the error messages of the analysis run.- Angegeben von:
getErrorMessages
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the error messages
-
getInfoMessages
Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns the info messages of the analysis run.- Angegeben von:
getInfoMessages
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the info messages
-
getIssues
public edu.hm.hafner.analysis.Report getIssues()Returns all issues of the associated static analysis run. These include outstanding issues as well as new issues.- Gibt zurück:
- all issues
-
isEmpty
public boolean isEmpty()Check ifAnalysisResult
issues are empty (including new, outstanding and fixed).- Gibt zurück:
- true if
AnalysisResult
issues are empty, else false.
-
hasNoNewWarnings
public boolean hasNoNewWarnings()Check ifAnalysisResult
issues does not have any new warnings.- Gibt zurück:
- true if
AnalysisResult
issues has no new warnings.
-
getOutstandingIssues
public edu.hm.hafner.analysis.Report getOutstandingIssues()Returns all outstanding issues of the associated static analysis run. I.e., all issues that are part of the current and previous report.- Gibt zurück:
- all outstanding issues
-
getNewIssues
public edu.hm.hafner.analysis.Report getNewIssues()Returns all new issues of the associated static analysis run. I.e., all issues that are part of the current report but have not been shown up in the previous report.- Gibt zurück:
- all new issues
-
getFixedIssues
public edu.hm.hafner.analysis.Report getFixedIssues()Returns all fixed issues of the associated static analysis run. I.e., all issues that are part of the previous report but are not present in the current report anymore.- Gibt zurück:
- all fixed issues
-
getNoIssuesSinceBuild
public int getNoIssuesSinceBuild()Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns the build number since the associated job has no issues.- Angegeben von:
getNoIssuesSinceBuild
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the build number since there are no issues, or -1 if issues have been reported
-
getSuccessfulSinceBuild
public int getSuccessfulSinceBuild()Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns the build number since the associated job has a successful static analysis result.- Angegeben von:
getSuccessfulSinceBuild
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the build number since the static analysis result is successful, or -1 if the result is not successful
-
isSuccessful
public boolean isSuccessful()Returns whether the static analysis result is successful with respect to the definedQualityGateEvaluator
.- Gibt zurück:
true
if the static analysis result is successful,false
if the static analysis result isQualityGateStatus.WARNING
orQualityGateStatus.FAILED
- Siehe auch:
-
getQualityGateStatus
public io.jenkins.plugins.util.QualityGateStatus getQualityGateStatus()Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns theQualityGateStatus
of the quality gates evaluation of the static analysis run.- Angegeben von:
getQualityGateStatus
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the quality gate status
-
getQualityGateResult
public io.jenkins.plugins.util.QualityGateResult getQualityGateResult()Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns theQualityGateResult
of the quality gates evaluation of the static analysis run.- Angegeben von:
getQualityGateResult
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the quality gate status
-
toString
-
getReferenceBuild
Beschreibung aus Schnittstelle kopiert:StaticAnalysisRun
Returns the reference static analysis run that has been used to compute the new issues.- Angegeben von:
getReferenceBuild
in SchnittstelleStaticAnalysisRun
- Gibt zurück:
- the reference build
-
getTotals
Beschreibung aus Schnittstelle kopiert:AnalysisBuildResult
Returns the total number of issues (by severity, new, total, fixed and delta) in a build.- Angegeben von:
getTotals
in SchnittstelleAnalysisBuildResult
- Gibt zurück:
- the totals
-
getSizePerOrigin
Beschreibung aus Schnittstelle kopiert:AnalysisBuildResult
Returns the number of issues in this analysis run, mapped by their origin. The origin is the tool that created the report.- Angegeben von:
getSizePerOrigin
in SchnittstelleAnalysisBuildResult
- Gibt zurück:
- number of issues per origin
-
getSizePerSeverity
Returns the number of issues in this analysis run, mapped bySeverity
.- Gibt zurück:
- number of issues per severity
-
getNewSizePerSeverity
Returns the new number of issues in this analysis run, mapped bySeverity
.- Gibt zurück:
- number of issues per severity
-
getTotalSize
public int getTotalSize()Beschreibung aus Schnittstelle kopiert:AnalysisBuildResult
Returns the total number of issues in this analysis run.- Angegeben von:
getTotalSize
in SchnittstelleAnalysisBuildResult
- Gibt zurück:
- total number of issues
-
getTotalSizeOf
public int getTotalSizeOf(edu.hm.hafner.analysis.Severity severity) Beschreibung aus Schnittstelle kopiert:AnalysisBuildResult
Returns the total number of issues in this analysis run that have the specifiedSeverity
.- Angegeben von:
getTotalSizeOf
in SchnittstelleAnalysisBuildResult
- Parameter:
severity
- the severity of the issues to match- Gibt zurück:
- total number of issues
-
getTotalErrorsSize
public int getTotalErrorsSize()Returns the total number of errors in this analysis run.- Gibt zurück:
- total number of errors
-
getTotalHighPrioritySize
public int getTotalHighPrioritySize()Returns the total number of high-severity issues in this analysis run.- Gibt zurück:
- total number of high-severity issues
-
getTotalNormalPrioritySize
public int getTotalNormalPrioritySize()Returns the total number of normal severity issues in this analysis run.- Gibt zurück:
- total number of normal severity issues
-
getTotalLowPrioritySize
public int getTotalLowPrioritySize()Returns the total number of low-severity issues in this analysis run.- Gibt zurück:
- total number of low-severity issues
-
getNewSize
public int getNewSize()Beschreibung aus Schnittstelle kopiert:AnalysisBuildResult
Returns the number of new issues in this analysis run.- Angegeben von:
getNewSize
in SchnittstelleAnalysisBuildResult
- Gibt zurück:
- number of new issues
-
getNewSizeOf
public int getNewSizeOf(edu.hm.hafner.analysis.Severity severity) Beschreibung aus Schnittstelle kopiert:AnalysisBuildResult
Returns the new number of issues in this analysis run that have the specifiedSeverity
.- Angegeben von:
getNewSizeOf
in SchnittstelleAnalysisBuildResult
- Parameter:
severity
- the severity of the issues to match- Gibt zurück:
- total number of issues
-
getNewErrorSize
public int getNewErrorSize()Returns the number of new errors in this analysis run.- Gibt zurück:
- number of new errors issues
-
getNewHighPrioritySize
public int getNewHighPrioritySize()Returns the number of new high-severity issues in this analysis run.- Gibt zurück:
- number of new high-severity issues
-
getNewNormalPrioritySize
public int getNewNormalPrioritySize()Returns the number of new normal-severity issues in this analysis run.- Gibt zurück:
- number of new normal-severity issues
-
getNewLowPrioritySize
public int getNewLowPrioritySize()Returns the number of new low-severity issues in this analysis run.- Gibt zurück:
- number of new low-severity issues
-
getFixedSize
public int getFixedSize()Beschreibung aus Schnittstelle kopiert:AnalysisBuildResult
Returns the number of fixed issues in this analysis run.- Angegeben von:
getFixedSize
in SchnittstelleAnalysisBuildResult
- Gibt zurück:
- number of fixed issues
-
getDeltaSize
public int getDeltaSize() -
getBuild
public edu.hm.hafner.echarts.Build getBuild()
-