File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -272,12 +272,12 @@ func main() {
272272 Usage : "sonar scanner jvm ops" ,
273273 EnvVar : "PLUGIN_SONAR_SCANNER_OPTS" ,
274274 },
275- cli.BoolTFlag {
275+ cli.BoolFlag {
276276 Name : "sonar_config_file" ,
277277 Usage : "Use sonar-project.properties if available" ,
278278 EnvVar : "PLUGIN_SONAR_CONFIG_FILE" ,
279279 },
280- cli.BoolTFlag {
280+ cli.BoolFlag {
281281 Name : "sonar_config_file_override" ,
282282 Usage : "Use sonar-project.properties if available and override host, login or/and project key" ,
283283 EnvVar : "PLUGIN_SONAR_CONFIG_FILE_OVERRIDE" ,
Original file line number Diff line number Diff line change @@ -418,7 +418,6 @@ func PreFlightGetLatestTaskID(config Config) (string, error) {
418418func (p Plugin ) Exec () error {
419419 // Check if the sonar-project.properties file exists in the current directory
420420 sonarConfigFile := "sonar-project.properties"
421- _ , err := os .Stat (sonarConfigFile )
422421
423422 args := []string {}
424423
@@ -431,6 +430,8 @@ func (p Plugin) Exec() error {
431430 args = append (args , "-Dsonar.projectBaseDir=" + p .Config .Workspace )
432431 }
433432
433+ _ , err := os .Stat (sonarConfigFile )
434+
434435 if os .IsNotExist (err ) || ! p .Config .UseSonarConfigFile {
435436 // If the configuration file does not exist, use the default parameters
436437 fmt .Println ("Configuration file not found. Using default parameters." )
You can’t perform that action at this time.
0 commit comments