Skip to content

SonarSource/sonar-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonar-Go

Build Status Quality Gate Status Coverage

This is a developer documentation. If you want to analyze source code in SonarQube read the analysis of Go documentation.

We use the native Go parser to parse the Go language.

Have questions or feedback?

To provide feedback (request a feature, report a bug, etc.) use the SonarQube Community Forum. Please do not forget to specify the language, plugin version, and SonarQube version.

Building

Setup

To configure build dependencies, run the following command:

git submodule update --init -- build-logic

To always get the latest version of the build logic during git operations, set the following configuration:

git config submodule.recurse true

For more information see README.md of cloud-native-gradle-modules.

Additionally, if you are on Windows, read the sonar-go-to-slang/README.md instructions.

Build

Build and run Unit Tests:

./gradlew build

`

Integration Tests

By default, Integration Tests (ITs) are skipped during builds. If you want to run them, you need first to retrieve the related projects which are used as input:

git submodule update --init

Then build and run the Integration Tests using the integrationTest task:

    ./gradlew integrationTest --info --no-daemon

You can also build and run only Ruling Tests:

./gradlew :its:ruling:integrationTest --info --no-daemon

License headers

License headers are automatically updated by the spotless plugin.

License

Copyright 2012-2025 SonarSource.

SonarQube analyzers released after November 29, 2024, including patch fixes for prior versions, are published under the Sonar Source-Available License Version 1 (SSALv1).

See individual files for details that specify the license applicable to each file. Files subject to the SSALv1 will be noted in their headers.