# Go

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* SonarQube scanner should run on an x86-64 Windows, macOS or Linux machine.
* You need the [Go](https://golang.org/) installation on the scanner machine only if you want to import coverage data.

## Language-specific properties <a href="#language-specific-properties" id="language-specific-properties"></a>

You can discover and update the Go-specific [analysis-parameters](https://docs.sonarsource.com/sonarqube-server/10.4/analyzing-source-code/analysis-parameters "mention") 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 <a href="#sonar-project-properties" id="sonar-project-properties"></a>

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

```css-79elbk
  sonar.projectKey=com.company.projectkey1
  sonar.projectName=My Project Name

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

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

## Related pages <a href="#related-pages" id="related-pages"></a>

* [overview](https://docs.sonarsource.com/sonarqube-server/10.4/analyzing-source-code/test-coverage/overview "mention")
* [external-analyzer-reports](https://docs.sonarsource.com/sonarqube-server/10.4/analyzing-source-code/importing-external-issues/external-analyzer-reports "mention") (GoVet, GoLint, GoMetaLinter)
