Added SonarQube analysis to the Makefile

This commit is contained in:
2023-08-08 10:50:05 -06:00
parent 88f10d13bb
commit 20143a0832
+12
View File
@@ -26,6 +26,18 @@ fmt:
analyze:
@cargo geiger
## Analyze the project with SonarQube - `cargo install cargo-sonar`
# sonar-scanner must be installed and LastPass
sonar:
@cargo clippy --message-format json > /tmp/clippy-report.json &&\
cargo sonar --issues clippy --clippy-path /tmp/clippy-report.json --issues-path /tmp/sonar-issues.json &&\
sonar-scanner\
-Dsonar.projectKey=Managarr\
-Dsonar.sources=.\
-Dsonar.externalIssuesReportPaths=/tmp/sonar-issues.json\
-Dsonar.host.url="$$(lpass show --url $$(basename $$(pwd)))"\
-Dsonar.login="$$(lpass show --password $$(basename $$(pwd)))"
release:
@git tag -a ${V} -m "Release ${V}" && git push origin ${V}