Open aafanasev opened 6 years ago
Since danger-jacoco searches classes in jacoco reports by a filename from git diff it cannot find nested classes, f.ex:
git diff
Code:
package sample; class A { class B {} }
Report:
Class: | Coverage: sample.A | 100% sample.A.B | 0%
Git modified files:
sample/A.java
Inner class B will be ignored
B
It's even worst for kotlin classes because kotlin allows to put all classes into single file / High-Level functions / package != location / @JvmName / @JvmMulticlass / etc
@JvmName
@JvmMulticlass
Need to rewrite function classes() (https://github.com/Malinskiy/danger-jacoco/blob/master/lib/jacoco/plugin.rb#L63) to make it able to find all classes inside modified files
classes()
For Java it can be just a mask something like class ([\w]+), but for kotlin much more effort is needed
class ([\w]+)
Any solution for Kotlin?
Problem
Since danger-jacoco searches classes in jacoco reports by a filename from
git diff
it cannot find nested classes, f.ex:Code:
Report:
Git modified files:
Inner class
B
will be ignoredKotlin
It's even worst for kotlin classes because kotlin allows to put all classes into single file / High-Level functions / package != location /
@JvmName
/@JvmMulticlass
/ etcSolution
Need to rewrite function
classes()
(https://github.com/Malinskiy/danger-jacoco/blob/master/lib/jacoco/plugin.rb#L63) to make it able to find all classes inside modified filesFor Java it can be just a mask something like
class ([\w]+)
, but for kotlin much more effort is needed