We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a Rust project in the root folder, and in a folder sonarqube inside the root I have this docker-compose:
root
sonarqube
services: sonarqube: image: sonarqube:community container_name: sonarqube ports: - "9000:9000" environment: SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonarqube SONAR_JDBC_USERNAME: sonarqube SONAR_JDBC_PASSWORD: sonarqube depends_on: - db volumes: - ./community-rust-plugin-0.2.4.jar:/opt/sonarqube/extensions/plugins/community-rust-plugin-0.2.4.jar - ./sonarqube-init.sh:/opt/sonarqube/init/sonarqube-init.sh entrypoint: > /bin/bash -c " bash /opt/sonarqube/init/sonarqube-init.sh & exec /opt/sonarqube/docker/entrypoint.sh" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000"] interval: 30s timeout: 10s retries: 5 db: image: postgres:13 container_name: sonarqube_db environment: POSTGRES_USER: sonarqube POSTGRES_PASSWORD: sonarqube POSTGRES_DB: sonarqube ### BEFORE SCANNER GENERATE THE clippy.json, sonar-issues.json and the lcov.info: ### commands to run before scanner: ### cargo tarpaulin --out Xml ### cargo clippy --message-format=json > clippy.json ### cargo sonar --clippy --clippy-path clippy.json ### RUSTC_BOOTSTRAP=1 cargo test -- -Z unstable-options --format json --report-time | cargo2junit > results.xml scanner: image: sonarsource/sonar-scanner-cli:latest container_name: scanner environment: - SONAR_HOST_URL=http://sonarqube:9000 - SONAR_SCANNER_OPTS=-Dsonar.working.directory=/tmp/.scannerwork - community.rust.clippy.reportPaths=/sonar/clippy.json - sonar.externalIssuesReportPaths=/sonar/sonar-issues.json - community.rust.cobertura.reportPaths=/sonar/cobertura.xml - community.rust.test.reportPath=/sonar/results.xml depends_on: sonarqube: condition: service_healthy volumes: - ../src:/usr/src - ../clipy.json:/sonar/clippy.json - ../sonar-issues.json:/sonar/sonar-issues.json - ../cobertura.xml:/sonar/cobertura.xml - ../test-report.xml:/sonar/results.xml working_dir: /usr/src entrypoint: > /bin/bash -c "sonar-scanner -Dsonar.projectKey=RustGeoCraft -Dsonar.login=admin -Dsonar.password=admin"
The coverage is not showned in SonarQube.
Is it my fault?
Other things showned fine.
The text was updated successfully, but these errors were encountered:
this is my cobertura.xml:
cobertura.xml
<?xml version="1.0"?><coverage lines-covered="50" lines-valid="618" line-rate="0.08090614886731391" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0" version="1.9" ...
Sorry, something went wrong.
I will check. There may be a problem with parsing cobertura report. Even through I fixed it in 0.2.3
You can check if lcov format will be displayed correctly
I tried Lcov format before Cobertura. Same result. Not showned. Thanks.
Adding a -X option at the end of your sonar-scanner command call should trigger verbose logs (generating extra log lines with "DEBUG" )
That may help understand the root cause
Most of the time, unreported coverage issues caused by either:
You may share the verbose logs here or privately for our review
Feel free to redact any sensitive content
C4tWithShell
No branches or pull requests
I have a Rust project in the
root
folder, and in a foldersonarqube
inside theroot
I have this docker-compose:The coverage is not showned in SonarQube.
Is it my fault?
Other things showned fine.
The text was updated successfully, but these errors were encountered: