moved optional arguments, to prevent failure when not providing them
parent
78246342b2
commit
79705bb2db
|
@ -127,8 +127,6 @@ func (p *Plugin) generateScannerArgs() []string {
|
|||
if !p.Config.UsingProperties {
|
||||
argsParameter := []string{
|
||||
"-Dsonar.projectKey=" + p.Config.Key,
|
||||
"-Dsonar.projectName=" + p.Config.Name,
|
||||
"-Dsonar.projectVersion=" + p.Config.Version,
|
||||
"-Dsonar.sources=" + p.Config.Sources,
|
||||
"-Dsonar.ws.timeout=" + strconv.Itoa(p.Config.HttpTimeout),
|
||||
"-Dsonar.log.level=" + p.Config.SonarLogLevel,
|
||||
|
@ -137,10 +135,11 @@ func (p *Plugin) generateScannerArgs() []string {
|
|||
}
|
||||
args.append(argsParameter...)
|
||||
|
||||
args.appendIfNotEmpty("-Dsonar.projectName=", p.Config.Name)
|
||||
args.appendIfNotEmpty("-Dsonar.projectVersion=", p.Config.Version)
|
||||
args.appendIfNotEmpty("-Dsonar.java.binaries=", p.Config.Binaries)
|
||||
args.appendIfNotEmpty("-Dsonar.exclusions=", p.Config.Exclusions)
|
||||
args.appendIfNotEmpty("-Dsonar.inclusions=", p.Config.Inclusions)
|
||||
|
||||
}
|
||||
|
||||
p.Logger.Debugw("argsbuilder",
|
||||
|
|
Loading…
Reference in New Issue