⚠️ Is your feature request related to a problem? Please describe
The current implementation of the plugin badge limitations when it comes to identifying the coverage when the kover plugin is configured with metrictype and groupBy to anything other than "line" and "application" respectivly, the plugin fails to pick up any coverage information. This is due to the hard-coded string search logic, making the plugin less flexible for users with different configuration needs.
This is where the issue would come from, and probably where the solution would be
log {
// Add a header line to the output before the lines with coverage
header = null
// Format of the strings to print coverage for the specified in `groupBy` group
format = "<entity> line coverage: <value>%"
// Specifies by which entity the code for separate coverage evaluation will be grouped
groupBy = GroupingEntityType.APPLICATION
// Specifies which metric is used for coverage evaluation
coverageUnits = MetricType.LINE
// Specifies aggregation function that will be calculated over all the elements of the same group
aggregationForGroup = AggregationType.COVERED_PERCENTAGE
}
💡 Describe the solution you'd like
I suggest modifying the Kover plugin to allow more dynamic string matching when looking for coverage data. One approach could be to introduce an option to specify a custom string or header to look for when aggregating coverage information. Alternatively, the plugin could be designed to simply search for the term "coverage" to make it more universally applicable, regardless of metrictype and groupBy settings. If it's possible, integrating these changes into the Kover extension by the badge plugin would be ideal.
🤚 Do you want to develop this feature yourself?
The current implementation of the plugin badge limitations when it comes to identifying the coverage when the kover plugin is configured with
metrictypeandgroupByto anything other than "line" and "application" respectivly, the plugin fails to pick up any coverage information. This is due to the hard-coded string search logic, making the plugin less flexible for users with different configuration needs.This is where the issue would come from, and probably where the solution would be
log { // Add a header line to the output before the lines with coverage header = null // Format of the strings to print coverage for the specified in `groupBy` group format = "<entity> line coverage: <value>%" // Specifies by which entity the code for separate coverage evaluation will be grouped groupBy = GroupingEntityType.APPLICATION // Specifies which metric is used for coverage evaluation coverageUnits = MetricType.LINE // Specifies aggregation function that will be calculated over all the elements of the same group aggregationForGroup = AggregationType.COVERED_PERCENTAGE }💡 Describe the solution you'd like
I suggest modifying the Kover plugin to allow more dynamic string matching when looking for coverage data. One approach could be to introduce an option to specify a custom string or header to look for when aggregating coverage information. Alternatively, the plugin could be designed to simply search for the term "coverage" to make it more universally applicable, regardless of
metrictypeandgroupBysettings. If it's possible, integrating these changes into the Kover extension by the badge plugin would be ideal.🤚 Do you want to develop this feature yourself?