Full documentation for SonarQube has moved to a new location: http://docs.sonarqube.org/display/SONAR

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To reuse existing reports from PHP Depend, PHPUnit, etc.:

  1. Put the previously generated report into $PROJECT_HOME/target/logs
  2. Set the property 'sonar.<external_tool>.analyzeOnly' to 'true'
  3. Set the 'sonar.<external_tool>.fileNamereportFileName' to the name of the report
  4. Set the 'sonar.<external_tool>.reportFileRelativePath' to the path where the report has been placed
Code Block
languagenone
langxml
sonar.phpPmd.analyzeOnly=true
sonar.phpPmd.reportFileName=myPmdReport.xml    #default is pmd.xml
sonar.phpPmd.reportFileRelativePath=<relative_path_to_xml_report>     #default is /log

sonar.phpCodesniffer.analyzeOnly=true
sonar.phpCodesniffer.reportFileName=myCodeSnifferReport.xml    #default is codesniffer.xml
sonar.phpCodesniffer.reportFileRelativePath=<relative_path_to_xml_report>    #default is /log
 
sonar.phpDepend.analyzeOnly=true
sonar.phpDepend.reportFileName=myPhpDependReport.xml    #default is pdepend.xml
sonar.phpDepend.reportFileRelativePath=<relative_path_to_xml_report>    #default is /log
sonar.phpDepend.reportType=summary-xml    #Type of report generated by PHP Depend. Valid values: summary-xml, phpunit-xml (default value, deprecated)

sonar.phpUnit.analyzeOnly=true
sonar.phpUnit.reportFileName=myPhpUnitReport.xml    #default is phpunit.xml
sonar.phpUnit.reportFileRelativePath=<relative_path_to_xml_report>    #default is /log

sonar.phpUnit.coverage.analyzeOnly=true
sonar.phpUnit.coverageReportFile=myCoverageReport.xml    #default is phpunit.coverage.xml
#Same path as sonar.phpUnit.reportFileRelativePath

...