https://medium.com/@index23/start-sonarqube-server-and-run-analyses-locally-with-docker-4550eb7112a3
docker run -d --name sonar-test -p 9000:9000 sonarqube
pip install pysonar
- access SQ using the web preview in the upper right corner of Cloud Shell using port 9000
- log in with admin/admin
- create your-project
- choose to analyze it locally
- create a token
- copy analysis command
Run analysis with copied command but using pysonar and http://localhost:9000 as below (http and not https !)
pysonar \
-Dsonar.projectKey=your-project \
-Dsonar.sources=. \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.token=sqp_490d030474e902ce73291484445409379d4be26c