Open leandromoreira opened 5 years ago
I found Score
at the text format (it's absent from json format) and then I use gnu/linux:
# if the score is lower than 65 it's going to return 1 otherwise it'll return 0
goreporter -p . -f text | grep Score | awk -F':' '$2 < 65 {print; err = 1} END {exit err}'
Is there any easier way?
There are:
Quality and Score, what's the difference?
Does the score follows the rule:
// +--------------------------------------------------+
// | issues | score |
// +==================================================+
// | 5 | 100-issues*2 |
// +--------------------------------------------------+
// | [5,10) | 100 - 10 - (issues-5)*4 |
// +--------------------------------------------------+
// | [10,20) | 100 - 10 - 20 - (issues-10)*5 |
// +--------------------------------------------------+
// | [20,40) | 100 - 10 - 20 - 50 - (issues-20)*1 |
// +--------------------------------------------------+
// | [40,*) | 0 |
// +--------------------------------------------------+
I want to use it to fail the build pipeline, for instance let's say the "quality".