sonarqubesonar-runner

Handling space in module name sonarqube runner


I have an existing sonar-runner that is working correctly like so:

sonar.modules=old-project1,old-project2

However I am adding a new module (new project3) to the runner but the module has a space in the project name so my new module line looks like this:

sonar.modules=new project3,old-project1,old-project2

I get errors for Sonar including "ERROR: Unrecognized option: project3,old-project1,old-project2" or "PROJECT:new project3" is not a valid project or module key. Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit."

It seems obvious to me that a space is not a legal character for the sonar runner modules but just wanted to confirm this or see if there is a work around as I am new to Sonar.

*Project names are changed from the actual implementation.


Solution

  • I confirm that spaces are not allowed in project keys. I feel that the Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit error message is explicit enough - but feel free to challenge if you don't agree.