goreporter icon indicating copy to clipboard operation
goreporter copied to clipboard

Does it provide an average final grade or Score?

Open leandromoreira opened this issue 5 years ago • 2 comments

I want to use it to fail the build pipeline, for instance let's say the "quality".

leandromoreira avatar Aug 21 '19 22:08 leandromoreira

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?

leandromoreira avatar Aug 22 '19 01:08 leandromoreira

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                                  |
//    +--------------------------------------------------+

leandromoreira avatar Aug 22 '19 01:08 leandromoreira