diff --git a/core/options.go b/core/options.go index 6a0cbee0..8a86a70b 100644 --- a/core/options.go +++ b/core/options.go @@ -171,6 +171,17 @@ func (o *QodanaOptions) ReportDirPath() string { return o.ReportDir } +func (o *QodanaOptions) CoverageDirPath() string { + if o.CoverageDir == "" { + if IsContainer() { + o.CoverageDir = "/data/coverage" + } else { + o.CoverageDir = filepath.Join(o.ProjectDir, ".qodana", "code-coverage") + } + } + return o.CoverageDir +} + func (o *QodanaOptions) ReportResultsPath() string { return filepath.Join(o.ReportDirPath(), "results") } diff --git a/core/properties.go b/core/properties.go index e73b6651..b1ec35bc 100644 --- a/core/properties.go +++ b/core/properties.go @@ -145,7 +145,7 @@ func GetProperties(opts *QodanaOptions, yamlProps map[string]string, dotNetOptio getDeviceIdSalt(), plugins, opts.AnalysisId, - opts.CoverageDir, + opts.CoverageDirPath(), ) for k, v := range yamlProps { // qodana.yaml – overrides vmoptions if !strings.HasPrefix(k, "-") {