The plugin enables analysis of PHP projects within with SonarQube.
It is compatible with the Issues Report plugin to run pre-commit local analysis.
- Install the PHP Environment
- Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
- Restart the SonarQube server
Run anAnalysis with the SonarQube Runner (Recommended
To run an analysis of your PHP project, use the SonarQube Runner.
Most of the time, using the exclusion properties will be enough to exclude files from being reported by SonarQube. However, there might be some cases where you really want to exclude files from being analyzed by an external tool (may it be PHP CodeSniffer, PHPMD or PHP Depend) because:
- a file is badly written and the tool is crashing when analyzing this fileit, thus preventing SonarQube from completing the analysis
- a big large number of files must be excluded and there's no need for the external tools to spend time analyzing files that won't be reported in SonarQube
When specifying exclusions directly for each tool, you should also consider to set setting the