Skip to content

Commit

Permalink
Format issues.json
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Nov 21, 2024
1 parent b9b0a07 commit ddaf97e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/sonar-qube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ jobs:
- name: Save the reports
run: |
mkdir -p sonar-reports
curl -s -u admin:admin "http://localhost:9000/api/issues/search?componentKeys=local_project" -o sonar-reports/issues.json
curl -s -u admin:admin "$SONAR_HOST_URL/dashboard/index/local_project" -o sonar-reports/sonar-report.html
curl -s -u admin:admin "http://localhost:9000/api/issues/search?componentKeys=local_project" -o issues-raw.json
cat issues-raw.json | jq > sonar-reports/issues.json
cat sonar-reports/issues.json | jq > sonar-reports/issues.json
curl -s -u admin:admin "http://localhost:9000/dashboard/index/local_project" -o sonar-reports/sonar-report.html
echo "SonarQube Issues Cmdline Report:"
jq -r '.issues[] | "Type: \(.type), Severity: \(.severity), Message: \(.message), File: \(.component)"' sonar-reports/issues.json
jq -r '.issues[] | "File: \(.component), Rule: \(.rule), Message: \(.message)"' sonar-reports/issues.json | sort
ISSUE_COUNT=$(jq '.issues | length' sonar-reports/issues.json)
if [ "$ISSUE_COUNT" -gt 0 ]; then
Expand Down

0 comments on commit ddaf97e

Please sign in to comment.