Skip to content

Commit 20a37dd

Browse files
chore(tests): updating test coverage report and badge
1 parent fb0bce4 commit 20a37dd

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

coverage.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,13 +2623,13 @@
26232623
// the type of profile
26242624
func getTotal(prof *profile.Profile, idx int) int64 <span class="cov2" title="2">{
26252625
var total, diffTotal int64
2626-
for _, sample := range prof.Sample </span><span class="cov10" title="55">{
2626+
for _, sample := range prof.Sample </span><span class="cov10" title="57">{
26272627
var v int64
26282628
v = sample.Value[idx]
26292629
if v &lt; 0 </span><span class="cov0" title="0">{
26302630
v = -v
26312631
}</span>
2632-
<span class="cov10" title="55">total += v
2632+
<span class="cov10" title="57">total += v
26332633
if sample.DiffBaseSample() </span><span class="cov0" title="0">{
26342634
diffTotal += v
26352635
}</span>
@@ -2653,8 +2653,8 @@
26532653
}</span>
26542654
<span class="cov1" title="1">return fmt.Sprintf("%.f%s", metric, defaultMetric)</span>
26552655
}
2656-
<span class="cov6" title="10">for k, u := range typeMap </span><span class="cov10" title="55">{
2657-
if u &gt;= formatter &amp;&amp; (value/u) &gt;= 1.0 </span><span class="cov7" title="19">{
2656+
<span class="cov6" title="10">for k, u := range typeMap </span><span class="cov9" title="55">{
2657+
if u &gt;= formatter &amp;&amp; (value/u) &gt;= 1.0 </span><span class="cov7" title="21">{
26582658
formatter = u
26592659
mesure = k
26602660
}</span>
@@ -5865,7 +5865,7 @@
58655865
func SelectLineWithMinimumDistance(distances map[int]int, startingFrom int) int <span class="cov5" title="8">{
58665866
minDistance, lineOfMinDistance := constants.MaxInteger, startingFrom
58675867
for line, distance := range distances </span><span class="cov6" title="12">{
5868-
if distance &lt; minDistance || distance == minDistance &amp;&amp; line &lt; lineOfMinDistance </span><span class="cov6" title="12">{
5868+
if distance &lt; minDistance || distance == minDistance &amp;&amp; line &lt; lineOfMinDistance </span><span class="cov5" title="8">{
58695869
minDistance = distance
58705870
lineOfMinDistance = line
58715871
}</span>
@@ -6390,11 +6390,11 @@
63906390
return err
63916391
}</span>
63926392

6393-
<span class="cov7" title="96">for _, change := range changeList.SimilarityIDChangeList </span><span class="cov10" title="802">{
6393+
<span class="cov7" title="96">for _, change := range changeList.SimilarityIDChangeList </span><span class="cov10" title="807">{
63946394
if _, ok := transitionQueryMap[change.QueryID]; ok </span><span class="cov0" title="0">{
63956395
log.Warn().Msgf(
63966396
"Duplicate query ID found in transition information file %s: %s", d.Name(), change.QueryID)
6397-
}</span> else<span class="cov10" title="802"> {
6397+
}</span> else<span class="cov10" title="807"> {
63986398
transitionQueryMap[change.QueryID] = change
63996399
}</span>
64006400
}
@@ -7316,12 +7316,12 @@
73167316

73177317
func (s *FileSystemSourceProvider) walkDir(ctx context.Context, scanPath string, resolved bool,
73187318
sink Sink, resolverSink ResolverSink, extensions model.Extensions) error <span class="cov1" title="3">{
7319-
return filepath.Walk(scanPath, func(path string, info os.FileInfo, err error) error </span><span class="cov9" title="34293">{
7319+
return filepath.Walk(scanPath, func(path string, info os.FileInfo, err error) error </span><span class="cov9" title="34331">{
73207320
if err != nil </span><span class="cov0" title="0">{
73217321
return err
73227322
}</span>
73237323

7324-
<span class="cov9" title="34293">if shouldSkip, skipFolder := s.checkConditions(info, extensions, path, resolved); shouldSkip </span><span class="cov9" title="33930">{
7324+
<span class="cov9" title="34331">if shouldSkip, skipFolder := s.checkConditions(info, extensions, path, resolved); shouldSkip </span><span class="cov9" title="33968">{
73257325
return skipFolder
73267326
}</span>
73277327

@@ -7393,11 +7393,11 @@
73937393
}
73947394

73957395
func (s *FileSystemSourceProvider) checkConditions(info os.FileInfo, extensions model.Extensions,
7396-
path string, resolved bool) (bool, error) <span class="cov10" title="34312">{
7396+
path string, resolved bool) (bool, error) <span class="cov10" title="34350">{
73977397
s.mu.RLock()
73987398
defer s.mu.RUnlock()
73997399

7400-
if info.IsDir() </span><span class="cov8" title="7144">{
7400+
if info.IsDir() </span><span class="cov8" title="7154">{
74017401
// exclude terraform cache folders
74027402
if queryRegexExcludeTerraCache.MatchString(path) </span><span class="cov3" title="13">{
74037403
log.Info().Msgf("Directory ignored: %s", path)
@@ -7408,23 +7408,23 @@
74087408
}</span>
74097409
<span class="cov3" title="13">return true, filepath.SkipDir</span>
74107410
}
7411-
<span class="cov8" title="7131">if f, ok := s.excludes[info.Name()]; ok &amp;&amp; containsFile(f, info) </span><span class="cov1" title="1">{
7411+
<span class="cov8" title="7141">if f, ok := s.excludes[info.Name()]; ok &amp;&amp; containsFile(f, info) </span><span class="cov1" title="1">{
74127412
log.Info().Msgf("Directory ignored: %s", path)
74137413
return true, filepath.SkipDir
74147414
}</span>
7415-
<span class="cov8" title="7130">_, err := os.Stat(filepath.Join(path, "Chart.yaml"))
7416-
if err != nil || resolved </span><span class="cov8" title="7127">{
7415+
<span class="cov8" title="7140">_, err := os.Stat(filepath.Join(path, "Chart.yaml"))
7416+
if err != nil || resolved </span><span class="cov8" title="7137">{
74177417
return true, nil
74187418
}</span>
74197419
<span class="cov1" title="3">return false, nil</span>
74207420
}
74217421

7422-
<span class="cov9" title="27168">if f, ok := s.excludes[info.Name()]; ok &amp;&amp; containsFile(f, info) </span><span class="cov0" title="0">{
7422+
<span class="cov9" title="27196">if f, ok := s.excludes[info.Name()]; ok &amp;&amp; containsFile(f, info) </span><span class="cov0" title="0">{
74237423
log.Trace().Msgf("File ignored: %s", path)
74247424
return true, nil
74257425
}</span>
7426-
<span class="cov9" title="27168">ext, _ := utils.GetExtension(path)
7427-
if !extensions.Include(ext) </span><span class="cov9" title="26806">{
7426+
<span class="cov9" title="27196">ext, _ := utils.GetExtension(path)
7427+
if !extensions.Include(ext) </span><span class="cov9" title="26834">{
74287428
log.Trace().Msgf("File ignored: %s", path)
74297429
return true, nil
74307430
}</span>
@@ -20877,12 +20877,12 @@
2087720877

2087820878
// function to check if an identifier is a parameter/variable and add the required keyword if so
2087920879
func convertToParamVar(str string, s *BicepVisitor) string <span class="cov5" title="44">{
20880-
for variable := range s.varList </span><span class="cov7" title="204">{
20880+
for variable := range s.varList </span><span class="cov7" title="215">{
2088120881
if variable == str </span><span class="cov3" title="7">{
2088220882
return "variables('" + str + CloseParenthesis
2088320883
}</span>
2088420884
}
20885-
<span class="cov5" title="37">for parameter := range s.paramList </span><span class="cov9" title="648">{
20885+
<span class="cov5" title="37">for parameter := range s.paramList </span><span class="cov9" title="634">{
2088620886
if parameter == str </span><span class="cov4" title="22">{
2088720887
return "parameters('" + str + CloseParenthesis
2088820888
}</span>
@@ -34736,15 +34736,15 @@
3473634736
}
3473734737

3473834738
// MapToStringSlice extract slice of keys from a map[string]string
34739-
func MapToStringSlice(stringKeyMap map[string]string) []string <span class="cov7" title="5257">{
34739+
func MapToStringSlice(stringKeyMap map[string]string) []string <span class="cov7" title="5263">{
3474034740
keys := make([]string, len(stringKeyMap))
3474134741

3474234742
i := 0
34743-
for k := range stringKeyMap </span><span class="cov10" title="84112">{
34743+
for k := range stringKeyMap </span><span class="cov10" title="84208">{
3474434744
keys[i] = k
3474534745
i++
3474634746
}</span>
34747-
<span class="cov7" title="5257">return keys</span>
34747+
<span class="cov7" title="5263">return keys</span>
3474834748
}
3474934749

3475034750
var queryHigh = model.QueryResult{ //nolint

0 commit comments

Comments
 (0)