Skip to content

Commit

Permalink
🐛 Scoped script should keep baseline for the second run and track cov…
Browse files Browse the repository at this point in the history
…erage feature usage.
  • Loading branch information
hybloid authored and qodana-bot committed Oct 10, 2024
1 parent 7cee873 commit 86e02a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ func runScopeScript(ctx context.Context, options *QodanaOptions, startHash strin
showReport := options.ShowReport
saveReportOpt := options.SaveReport
props := options.Property
baseline := options.Baseline

runFunc := func(hash string) (bool, int) {
e := platform.GitCheckout(options.ProjectDir, hash, true, options.LogDirPath())
Expand Down Expand Up @@ -364,7 +365,10 @@ func runScopeScript(ctx context.Context, options *QodanaOptions, startHash strin
options.SaveReport = false

startDir := filepath.Join(resultsDir, "start")
options.Property = append(options.Property, "-Dqodana.skip.result=true") // don't print results
options.Property = append(
options.Property,
"-Dqodana.skip.result=true", // don't print results
"-Dqodana.skip.coverage.computation=true") // don't compute coverage on first pass
options.Baseline = ""
options.ResultsDir = startDir
options.ApplyFixes = false
Expand All @@ -384,7 +388,9 @@ func runScopeScript(ctx context.Context, options *QodanaOptions, startHash strin
"-Dqodana.skip.preamble=true", // don't print the QD logo again
"-Didea.headless.enable.statistics=false", // disable statistics for second run
fmt.Sprintf("-Dqodana.scoped.baseline.path=%s", startSarif), // disable statistics for second run
"-Dqodana.skip.coverage.issues.reporting=true", // don't report coverage issues on the second pass, but allow numbers to be computed
)
options.Baseline = baseline
options.ResultsDir = endDir
options.ApplyFixes = applyFixes
options.Cleanup = cleanup
Expand Down

0 comments on commit 86e02a5

Please sign in to comment.