in cdnet/options.go [28:92]
func (l CdnetLinter) computeCdnetArgs(c thirdpartyscan.Context) ([]string, error) {
target := getSolutionOrProject(c)
if target == "" {
return nil, fmt.Errorf("solution/project relative file path is not specified. Use --solution or --project flags or create qodana.yaml file with respective fields")
}
var props = ""
for _, p := range c.Property() {
if strings.HasPrefix(p, "log.") ||
strings.HasPrefix(p, "idea.") ||
strings.HasPrefix(p, "qodana.") ||
strings.HasPrefix(p, "jetbrains.") {
continue
}
if props != "" {
props += ";"
}
props += p
}
dotNet := c.QodanaYamlConfig().DotNet
if c.CdnetConfiguration() != "" {
if props != "" {
props += ";"
}
props += "Configuration=" + c.CdnetConfiguration()
} else if dotNet.Configuration != "" {
if props != "" {
props += ";"
}
props += "Configuration=" + dotNet.Configuration
}
if c.CdnetPlatform() != "" {
if props != "" {
props += ";"
}
props += "Platform=" + c.CdnetPlatform()
} else if dotNet.Platform != "" {
if props != "" {
props += ";"
}
props += "Platform=" + dotNet.Platform
}
mountInfo := c.MountInfo()
sarifPath := platform.GetSarifPath(c.ResultsDir())
args := []string{
"dotnet",
strutil.QuoteForWindows(mountInfo.CustomTools[thirdpartyscan.Clt]),
"inspectcode",
strutil.QuoteForWindows(target),
"-o=\"" + sarifPath + "\"",
"-f=\"Qodana\"",
"--LogFolder=\"" + c.LogDir() + "\"",
}
if props != "" {
args = append(args, "--properties:"+props)
}
if c.NoStatistics() {
args = append(args, "--telemetry-optout")
}
if c.CdnetNoBuild() {
args = append(args, "--no-build")
}
return args, nil
}