Skip to content

Commit

Permalink
feat: add defect statistics - job summary output
Browse files Browse the repository at this point in the history
Example output:

```md
|          | πŸ‘• Style | πŸ—’οΈ Note | ⚠️ Warning | πŸ›‘ Error |
|:--------:|:--------:|:-------:|:----------:|:--------:|
| πŸ”’ Count | **N/A**  | **N/A** | **10**     | **0**    |
```
  • Loading branch information
jamacku committed Aug 11, 2023
1 parent 58e3dd8 commit 120a1bc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ summary () {
scan_summary=$(diff_scan_summary)
fi

local defect_statistics=""
defect_statistics=$(summary_defect_statistics)

local useful_links=
useful_links=$(summary_useful_links)

Expand All @@ -18,6 +21,8 @@ summary () {
${scan_summary}
${defect_statistics}
${useful_links}"
}

Expand Down Expand Up @@ -106,6 +111,15 @@ link_to_results () {
esac
}

summary_defect_statistics () {
echo -e "\
#### New defects statistics
| | πŸ‘• Style | πŸ—’οΈ Note | ⚠️ Warning | πŸ›‘ Error |
|:--------:|:------------------------:|:-----------------------:|:--------------------------:|:------------------------:|
| πŸ”’ Count | **${stat_style:-"N/A"}** | **${stat_note:-"N/A"}** | **${stat_warning:-"N/A"}** | **${stat_error:-"N/A"}** |"
}

# Print useful information at the end of summary report
# $? - return value - 0 on success
summary_useful_links () {
Expand Down

0 comments on commit 120a1bc

Please sign in to comment.