This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

See latest version
Start Free
9.6 | Analyzing source code | Languages | Go

Go

On this page

Prerequisites

  • SonarQube scanner should run on an x86-64 Windows, macOS or Linux machine.
  • You need the Go installation on the scanner machine only if you want to import coverage data.

Language-specific properties

You can discover and update the Go-specific properties in Administration > General Settings > Languages > Go

By default, all the vendor directories are excluded from the analysis. However, you can change the property sonar.go.exclusions to a different pattern if you want to force their analysis (not recommended).

sonar-project.properties sample

Here is a first version of a sonar-project.properties file, valid for a simple Go project:

  sonar.projectKey=com.company.projectkey1
  sonar.projectName=My Project Name

  sonar.sources=.
  sonar.exclusions=**/*_test.go

  sonar.tests=.
  sonar.test.inclusions=**/*_test.go

Issue tracker

Check the issue tracker for this language.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License