Klasse AnalysisResult

java.lang.Object
io.jenkins.plugins.analysis.core.model.AnalysisResult
Alle implementierten Schnittstellen:
AnalysisBuildResult, StaticAnalysisRun, Serializable

public class AnalysisResult extends Object implements Serializable, StaticAnalysisRun
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

    Konstruktoren
    Modifizierer
    Konstruktor
    Beschreibung
     
    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 of 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 of AnalysisResult.
     
    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 of AnalysisResult.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    io.jenkins.plugins.forensics.blame.Blames
    Returns the blames for the report.
    edu.hm.hafner.echarts.Build
     
    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.
    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 specified Severity.
    Map<edu.hm.hafner.analysis.Severity,Integer>
    Returns the new number of issues in this analysis run, mapped by Severity.
    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<?,?>
    Returns the run that created this static analysis result.
    io.jenkins.plugins.util.QualityGateResult
    Returns the QualityGateResult of the quality gates evaluation of the static analysis run.
    io.jenkins.plugins.util.QualityGateStatus
    Returns the QualityGateStatus 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.
    Map<edu.hm.hafner.analysis.Severity,Integer>
    Returns the number of issues in this analysis run, mapped by Severity.
    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 specified Severity.
    boolean
    Check if AnalysisResult issues does not have any new warnings.
    boolean
    Check if AnalysisResult issues are empty (including new, outstanding and fixed).
    boolean
    Returns whether the static analysis result is successful with respect to the defined QualityGateEvaluator.
    protected Object
    Called after de-serialization to retain backward compatibility.
    void
    setOwner(Run<?,?> owner)
    Sets the run for this result after Jenkins read its data from disk.
     

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 of AnalysisResult.
      Parameter:
      owner - the current build as the owner of this action
      id - ID of the results
      report - the issues of this result
      blames - author and commit information for all issues
      totals - repository statistics for all issues
      qualityGateResult - the quality gate status
      sizePerOrigin - the number of issues per origin
      previousResult - 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 of AnalysisResult.
      Parameter:
      owner - the current build as the owner of this action
      id - ID of the results
      report - the issues of this result
      blames - author and commit information for all issues
      totals - repository statistics for all issues
      qualityGateResult - the quality gate status
      sizePerOrigin - 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 of AnalysisResult.
      Parameter:
      owner - the current run as the owner of this action
      id - ID of the results
      report - the issues of this result
      blames - author and commit information for all issues
      repositoryStatistics - source code repository statistics for all issues
      qualityGateResult - the quality gate status
      sizePerOrigin - the number of issues per origin
      canSerialize - determines whether the result should be persisted in the build folder
  • Methodendetails

    • readResolve

      protected Object 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

      public String getId()
      Beschreibung aus Schnittstelle kopiert: StaticAnalysisRun
      Returns the ID of the static analysis result.
      Angegeben von:
      getId in Schnittstelle StaticAnalysisRun
      Gibt zurück:
      the ID
    • getOwner

      public Run<?,?> getOwner()
      Beschreibung aus Schnittstelle kopiert: StaticAnalysisRun
      Returns the run that created this static analysis result.
      Angegeben von:
      getOwner in Schnittstelle StaticAnalysisRun
      Gibt zurück:
      the run
    • setOwner

      public void setOwner(Run<?,?> owner)
      Sets the run for this result after Jenkins read its data from disk.
      Parameter:
      owner - the initialized run
    • getErrorMessages

      public org.eclipse.collections.api.list.ImmutableList<String> getErrorMessages()
      Beschreibung aus Schnittstelle kopiert: StaticAnalysisRun
      Returns the error messages of the analysis run.
      Angegeben von:
      getErrorMessages in Schnittstelle StaticAnalysisRun
      Gibt zurück:
      the error messages
    • getInfoMessages

      public org.eclipse.collections.api.list.ImmutableList<String> getInfoMessages()
      Beschreibung aus Schnittstelle kopiert: StaticAnalysisRun
      Returns the info messages of the analysis run.
      Angegeben von:
      getInfoMessages in Schnittstelle StaticAnalysisRun
      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 if AnalysisResult issues are empty (including new, outstanding and fixed).
      Gibt zurück:
      true if AnalysisResult issues are empty, else false.
    • hasNoNewWarnings

      public boolean hasNoNewWarnings()
      Check if AnalysisResult 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 Schnittstelle StaticAnalysisRun
      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 Schnittstelle StaticAnalysisRun
      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 defined QualityGateEvaluator.
      Gibt zurück:
      true if the static analysis result is successful, false if the static analysis result is QualityGateStatus.WARNING or QualityGateStatus.FAILED
      Siehe auch:
      • QualityGateEvaluator
    • getQualityGateStatus

      public io.jenkins.plugins.util.QualityGateStatus getQualityGateStatus()
      Beschreibung aus Schnittstelle kopiert: StaticAnalysisRun
      Returns the QualityGateStatus of the quality gates evaluation of the static analysis run.
      Angegeben von:
      getQualityGateStatus in Schnittstelle StaticAnalysisRun
      Gibt zurück:
      the quality gate status
    • getQualityGateResult

      public io.jenkins.plugins.util.QualityGateResult getQualityGateResult()
      Beschreibung aus Schnittstelle kopiert: StaticAnalysisRun
      Returns the QualityGateResult of the quality gates evaluation of the static analysis run.
      Angegeben von:
      getQualityGateResult in Schnittstelle StaticAnalysisRun
      Gibt zurück:
      the quality gate status
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • getReferenceBuild

      public Optional<Run<?,?>> 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 Schnittstelle StaticAnalysisRun
      Gibt zurück:
      the reference build
    • getTotals

      public IssuesStatistics 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 Schnittstelle AnalysisBuildResult
      Gibt zurück:
      the totals
    • getSizePerOrigin

      public Map<String,Integer> 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 Schnittstelle AnalysisBuildResult
      Gibt zurück:
      number of issues per origin
    • getSizePerSeverity

      public Map<edu.hm.hafner.analysis.Severity,Integer> getSizePerSeverity()
      Returns the number of issues in this analysis run, mapped by Severity.
      Gibt zurück:
      number of issues per severity
    • getNewSizePerSeverity

      public Map<edu.hm.hafner.analysis.Severity,Integer> getNewSizePerSeverity()
      Returns the new number of issues in this analysis run, mapped by Severity.
      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 Schnittstelle AnalysisBuildResult
      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 specified Severity.
      Angegeben von:
      getTotalSizeOf in Schnittstelle AnalysisBuildResult
      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 Schnittstelle AnalysisBuildResult
      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 specified Severity.
      Angegeben von:
      getNewSizeOf in Schnittstelle AnalysisBuildResult
      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 Schnittstelle AnalysisBuildResult
      Gibt zurück:
      number of fixed issues
    • getDeltaSize

      public int getDeltaSize()
    • getBuild

      public edu.hm.hafner.echarts.Build getBuild()