bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

Html report columns do not line up if a column has a format of 'longbar' #137

Closed freshcodemonger closed 5 years ago

freshcodemonger commented 5 years ago

If you have a column specification like:

columns {
            ncLineCount format: 'raw'
            coveredBranches format: 'longbar'
            totalBranches format: 'raw'
            coveredMethods format: '%'
            coveredStatements format: '%'
            totalStatements format: 'raw' 
        }

The coveredBranches longbar or any longbar format data will push the data for the column headers into different columns. Clicking on the column header will then end up sorting the data for a different column.

Alex-Vol-SV commented 5 years ago

This is completely controlled by the OpenClover library. I only provide the desired specifications to the library. If you do not like how the rendered report works or you find an issue open a defect against OpenClover.

freshcodemonger commented 5 years ago

Thanks. I'll see about logging a bug over there. One other thing is that the :

totalPercentageCovered format: 'raw'

is returning values like : 7,977

and I am confused how this is a percent. Is this also a problem with openClover?

Alex-Vol-SV commented 5 years ago

Yes, all this plugin does is call the generate report function of OpenClover library with the specified parameters. Technically we call the Ant task with the specified parameters but you see there is no way to change the way these parameters are handled. Perhaps the OpenClover documentation on this option explains more of this value and why it is not mapping to a 0-100 indicator.