From 20143a08325a7962d46e0424eabb24af47c64362 Mon Sep 17 00:00:00 2001 From: Dark-Alex-17 Date: Tue, 8 Aug 2023 10:50:05 -0600 Subject: [PATCH] Added SonarQube analysis to the Makefile --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index e74b390..a0bd3ff 100644 --- a/Makefile +++ b/Makefile @@ -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}