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

Add SonarScanner docs #8

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions sonar-scanner-cli/content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# What is SonarScanner CLI?

[SonarScanner](https://redirect.sonarsource.com/doc/install-configure-scanner.html) is the official scanner used to run code analysis on SonarQube and SonarCloud.

# How to use this image

To analyze your repository, you have to:

- Define your configuration in the `sonar-project.properties` file in the root of your source code repository.
- Pass your source code to the scanner. Your source code repository should be mounted to the container `/usr/src` directory.
- 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.
- Run the following command:

```console
docker run \
--rm \
-e SONAR_HOST_URL=http://${SONARQUBE_URL} \
-v "${YOUR_REPO}:/usr/src" \
sonar-scanner-cli
```

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.
1 change: 1 addition & 0 deletions sonar-scanner-cli/get-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +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)
1 change: 1 addition & 0 deletions sonar-scanner-cli/github-repo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/SonarSource/sonar-scanner-cli-docker
1 change: 1 addition & 0 deletions sonar-scanner-cli/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
View [license information](http://www.gnu.org/licenses/lgpl.txt) for the software contained in this image.
Binary file added sonar-scanner-cli/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions sonar-scanner-cli/maintainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[SonarSource](%%GITHUB-REPO%%)