Skip to content
New issue

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

Add Statistics of defect severities 📊 #233

Merged
merged 10 commits into from Aug 11, 2023

Conversation

jamacku
Copy link
Member

@jamacku jamacku commented Apr 7, 2023

Let's add statistics about the type and count of new defects.

Example of statistics in console output for severity: warning:

Screenshot from 2023-08-11 13-22-39

Example of statistics in job summary output for severity: warning:

Screenshot from 2023-08-11 13-21-31


  • Add tests
  • Add documentation in README
  • Add documentation of functions
  • Add CHANGELOG
  • Test functionality

@jamacku jamacku added this to the v4.3.0 milestone Apr 7, 2023
@jamacku jamacku self-assigned this Apr 7, 2023
@jamacku jamacku linked an issue Apr 7, 2023 that may be closed by this pull request
@mergify mergify bot added the source label Apr 7, 2023
src/validation.sh Fixed Show fixed Hide fixed
echo -e "✋ ${YELLOW}Defects, NEEDS INSPECTION${NOCOLOR}"
csgrep ../defects.log
return 1
fi

echo -e "🥳 ${GREEN}No defects added. Yay!${NOCOLOR}"
}

print_statistics () {
echo -e "::group::📊 ${WHITE}Statistics${NOCOLOR}"

Check warning

Code scanning / shellcheck

WHITE is referenced but not assigned. Warning

WHITE is referenced but not assigned.
@jamacku jamacku force-pushed the statistics branch 2 times, most recently from 9624cf7 to 59c44a3 Compare August 10, 2023 15:17
@codecov
Copy link

codecov bot commented Aug 11, 2023

Codecov Report

Merging #233 (d5837f6) into main (7cd5489) will increase coverage by 0.85%.
Report is 2 commits behind head on main.
The diff coverage is 90.62%.

@@            Coverage Diff             @@
##             main     #233      +/-   ##
==========================================
+ Coverage   82.84%   83.70%   +0.85%     
==========================================
  Files           4        4              
  Lines         239      270      +31     
==========================================
+ Hits          198      226      +28     
- Misses         41       44       +3     
Files Changed Coverage Δ
src/summary.sh 78.84% <50.00%> (-3.77%) ⬇️
src/index.sh 79.54% <100.00%> (ø)
src/validation.sh 100.00% <100.00%> (ø)

@jamacku jamacku force-pushed the statistics branch 2 times, most recently from 0ce855e to 844a257 Compare August 11, 2023 13:10
@jamacku jamacku marked this pull request as ready for review August 11, 2023 14:04
@jamacku jamacku changed the title Add Statistics 📊 Add Statistics of defect severities 📊 Aug 11, 2023
example of output:

```sh
📊 Statistics of defects
  Error: 0
  Warning: 1
  Note: 0
  Style: 0
```
Example output:

```md
|          | 👕 Style | 🗒️ Note | ⚠️ Warning | 🛑 Error |
|:--------:|:--------:|:-------:|:----------:|:--------:|
| 🔢 Count | **N/A**  | **N/A** | **10**     | **0**    |
```
- `print_statistics()`
- `gather_statistics()`
- `get_number_of_defects_by_severity()`
- `summary_defect_statistics()`
@jamacku jamacku merged commit f5d66b7 into redhat-plumbers-in-action:main Aug 11, 2023
8 of 9 checks passed
@jamacku jamacku deleted the statistics branch August 11, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add statistics of defect severities 📊
1 participant