user2995833
user2995833

Reputation: 93

How to configure Sonarqube for PHP projects?

Trying to setup Sonarqube for PHP code base for codecoverage analysis. I have modified the sonar-scanner.properties file with the following configuration.

Path = sonar-scanner-2.8\conf\sonar-scanner.properties
sonar.projectKey=PhpProject
sonar.projectName=PhpProject
sonar.language=php
sonar.sources=C:/Users/Hameetha/Downloads/SonarSource-sonar-examples-4.5-21-gbb6c0f9/SonarSource-sonar-examples-bb6c0f9/projects/languages/php/php-sonar-runner-unit-tests
sonar.scm.provide=sonarphp

however when running the sonar-scanner the following error msg is shown.

enter image description here

Upvotes: 4

Views: 11329

Answers (2)

dagonza
dagonza

Reputation: 259

The filename is incorrect. It is not sonar-scanner.properties it is sonar-project.properties. That might well be your problem.

Upvotes: 0

Julien L.
Julien L.

Reputation: 2587

Having a closer look to the console, you'll see the following message : You must install a plugin that supports the language 'php'.

So all you need to do is to install the SonarPHP plugin: https://docs.sonarqube.org/display/PLUG/SonarPHP

Upvotes: 3

Related Questions