Versions Compared


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


Enables the powerful SonarGo analyzer to scan GoLang 1.0+ files.


  • Go > 1.10

  • SonarQube Scanner should run on a x86-64 Windows, macOS or Linux 64bits machine

  • You need the Go installation on the scan machine only if you want to import coverage data

First Analysis of a Go Project

  1. Install SonarQube Server (see Setup and Upgrade for more details)
  2. Install SonarQube Scanner and be sure your can call sonar-scanner from the directory where you have your source code
  3. Install SonarGo (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:

    Code Block
    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:

Code Block

Here is a good first version of a, correctly excluding some "vendor" directories and categorizing files as "main" or "test":

Code Block
sonar.projectName=My Project Name



Advanced Usage

With SonarGo, you can also: