Skip to content

Commit

Permalink
Merge pull request #32 from bmrvilela/master
Browse files Browse the repository at this point in the history
Fix to ProjectHasScanRunning and GetScanCoverage
  • Loading branch information
portilha authored Aug 28, 2024
2 parents cd2c204 + 67afa52 commit 7449f4c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Checkmarx.API/CxClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,7 @@ public Scan GetScanById(long scanId)

public bool ProjectHasScanRunning(long projectId)
{
return GetScansQueue(projectId).Any();
return GetScansQueue(projectId).Any(x => !x.CompletedOn.HasValue);
}

public ICollection<ScanQueue> GetScansQueue(long? projectId = null)
Expand Down Expand Up @@ -3184,11 +3184,10 @@ public double GetScanCoverage(long scanId)
foreach (Match m in mc)
{
GroupCollection groups = m.Groups;
double.TryParse(groups["pc"].Value.Replace(".", ","), out firstFinalScanAccuracy);
double.TryParse(groups["pc"].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out firstFinalScanAccuracy);
}

return firstFinalScanAccuracy;

}

/// <summary>
Expand Down

0 comments on commit 7449f4c

Please sign in to comment.