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

Commit 65e0c38

Browse files
fixup! add sonarscanner doc
1 parent 70e055c commit 65e0c38

File tree

8 files changed

+28
-7
lines changed

8 files changed

+28
-7
lines changed

sonar-scanner-cli/README-short.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SonarScanner is the official scanner used to run code analysis on SonarQube.

sonar-scanner-cli/content.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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.
4+
5+
# How to use this image
6+
7+
To scan your repository, you have to:
8+
9+
- pass your source code to the scanner. Your source code repository should be mounted to the containers `/usr/src` directory, since this is its default work directory.
10+
- (optional) unless you already defined both `sonar.host.url` and `sonar.projectKey` in `sonar-project.properties` file in the root of your source code repository, you also need to:
11+
- pass the URL of your SonarQube instance / SonarCloud (with `-Dsonar.host.url` parameter or `SONAR_HOST_URL` environment variable) and make sure it can be accessed from the container. The default URL that is used is `http://localhost:9000` but depending on your setup, it's probably not what you need.
12+
- pass the SonarQube / SonarCloud project key (with `-Dsonar.projectKey` parameter)
13+
14+
```console
15+
docker run \
16+
--rm \
17+
-v ${MY_REPOSITORY_PATH}:/usr/src \
18+
sonar-scanner-cli \
19+
-Dsonar.host.url="${MY_SONARQUBE_URL}" \
20+
-Dsonar.projectKey=${MY_PROJECT_KEY}
21+
```
22+
23+
For more details on how to use the image (like caching, using self-signed certificates, etc.), visit [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%%)

sonarqube/sonarscanner.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)