Skip to end of metadata
Go to start of metadata

By SonarSource and Matthijs Galesloot – The Apache Software License, Version 2.0 – Issue TrackerSources – Supported by SonarSource
More versions
SonarHTML 3.1 – Jan 18, 2019 – SonarQube 7.6+
Improve JSP and Angular files analysis
DownloadRelease notes


Enables the SonarHTML analyzer. This analyzer was previously named SonarWeb.

First Analysis of a Web Project

  1. Install SonarQube Server (see Setup and Upgrade for more details)
  2. Install SonarQube Scanner and be sure you can call sonar-scanner from the directory where you have your source code
  3. Install SonarHTML (see Installing a Plugin for more details)
  4. Run your analysis with the SonarQube Scanner by executing the following command from the root directory of the project:

    sonar-scanner -Dsonar.projectKey=xxx -Dsonar.sources=.
  5. Follow the link provided at the end of the analysis to browse your project's quality in SonarQube UI

Further Analyses

Assuming steps 1-3 above have already been completed, you'll want to encapsulate your analysis parameters in a file at the root of your project (see a sample project on GitHub: Then subsequent analyses can simply be run with:


PHP code analysis

SonarPHP and SonarHTML will both analyze files with extensions: .php, .php3, .php4, .php5, .phtml .

However there is one limitation: the file metrics, like the number of line of code, will only be created for one of the languages, PHP or HTML. SonarPHP will do it if it is installed, otherwise SonarHTML will generate those metrics.

SonarHTML will do the analysis by default even if the php file extensions are not listed in the list of files to analyze.

  • No labels