https://github.com/lucascorpion/instant-sonar
Instantly analyse your code with SonarQube in Docker, with a single command.
https://github.com/lucascorpion/instant-sonar
cli docker sonarqube static-code-analysis
Last synced: 3 months ago
JSON representation
Instantly analyse your code with SonarQube in Docker, with a single command.
- Host: GitHub
- URL: https://github.com/lucascorpion/instant-sonar
- Owner: LucaScorpion
- License: mit
- Created: 2023-08-18T09:21:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-23T10:27:22.000Z (about 2 years ago)
- Last Synced: 2025-03-21T05:44:37.958Z (7 months ago)
- Topics: cli, docker, sonarqube, static-code-analysis
- Language: Go
- Homepage:
- Size: 44.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Instant Sonar
**Instantly analyse your code with SonarQube in Docker, with a single command.**
[](https://github.com/LucaScorpion/instant-sonar/actions/workflows/build.yml)
[](https://github.com/LucaScorpion/instant-sonar/actions/workflows/publish.yml)
[](https://asciinema.org/a/604152)
## Usage
Simply download the appropriate binary for your platform from the [latest release](https://github.com/LucaScorpion/instant-sonar/releases/latest) and execute it.
To analyse your current working directory:
```shell
instant-sonar
```
To analyse a different directory:
```shell
instant-sonar "path/to/project"
```
For all help and options:
```shell
instant-sonar --help
```
## Performance Note (Mac + Windows)
On Mac and Windows,
using a bound volume for the Sonar Scanner can induce a performance hit.
To improve this, there is a "copy" flag (`-c` or `--copy`),
which will copy files into the Sonar Scanner container instead of binding a volume.
On Linux, using this option is slower than using a bound volume.
## What it Does
Instant Sonar will start a [SonarQube](https://hub.docker.com/_/sonarqube) container,
configure it so it can be accessed without having to log in,
and set up a new project.
It will then start a [Sonar Scanner](https://hub.docker.com/r/sonarsource/sonar-scanner-cli) container,
which will run the project analysis and send the results to SonarQube.
After this is done, it will output a link which you can use to view the analysis results.
Is something not working as intended?
Feel free to [create an issue](https://github.com/LucaScorpion/instant-sonar/issues/new)!