Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit e3e2833

Browse files
add sonar-scanner-cli docs
1 parent da6dc19 commit e3e2833

File tree

6 files changed

+26
-0
lines changed

6 files changed

+26
-0
lines changed

sonar-scanner-cli/content.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# What is SonarScanner CLI?
2+
3+
[SonarScanner](https://redirect.sonarsource.com/doc/install-configure-scanner.html) is the official scanner used to run code analysis on SonarQube and SonarCloud.
4+
5+
# How to use this image
6+
7+
To analyze your repository, you have to:
8+
9+
- Define your configuration in the `sonar-project.properties` file in the root of your source code repository.
10+
- Pass your source code to the scanner. Your source code repository should be mounted to the container `/usr/src` directory.
11+
- Pass your SonarQube or SonarCloud URL in the SONAR_HOST_URL environment variable. The default URL is `http://localhost:9000`, but you'll most likely need to change it to fit your setup.
12+
- Run the following command:
13+
14+
```console
15+
docker run \
16+
--rm \
17+
-e SONAR_HOST_URL=http://${SONARQUBE_URL} \
18+
-v "${YOUR_REPO}:/usr/src" \
19+
sonar-scanner-cli
20+
```
21+
22+
For more details on how to use the image, visit the [SonarScanner](https://redirect.sonarsource.com/doc/install-configure-scanner.html) page in the SonarQube documentation.

sonar-scanner-cli/get-help.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[the SonarSource Community forum](https://community.sonarsource.com/tags/c/help/sq/docker), [the Docker Community Forums](https://forums.docker.com/), [the Docker Community Slack](https://blog.docker.com/2016/11/introducing-docker-community-directory-docker-community-slack/), or [Stack Overflow](https://stackoverflow.com/search?tab=newest&q=docker)

sonar-scanner-cli/github-repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/SonarSource/sonar-scanner-cli-docker

sonar-scanner-cli/license.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
View [license information](http://www.gnu.org/licenses/lgpl.txt) for the software contained in this image.

sonar-scanner-cli/logo.png

9.05 KB
Loading

sonar-scanner-cli/maintainer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[SonarSource](%%GITHUB-REPO%%)

0 commit comments

Comments
 (0)