Skip to content

Commit

Permalink
~small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shanshin committed Mar 27, 2024
1 parent 56bf463 commit 721c753
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public object KoverLegacyFeatures {
* Generate Kover HTML report.
*
* @param htmlDir Output directory with result HTML report
* @param charsetName Name of charset used in HTML report
* @param binaryReports List of coverage binary reports in IC format
* @param classfileDirs List of root directories for compiled class-files
* @param sourceDirs List of root directories for Java and Kotlin source files
Expand Down Expand Up @@ -141,7 +142,7 @@ public object KoverLegacyFeatures {
public fun aggregateIc(
icFile: File, filters: ClassFilters, tempDir: File, binaryReports: List<File>, classfileDirs: List<File>
) {
val smapFile = File(tempDir, "report.smap")
val smapFile = tempDir.resolve("report.smap")

val request = Request(filters.convert(), icFile, smapFile)
AggregatorApi.aggregate(listOf(request), binaryReports, classfileDirs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ internal object LegacyVerification {

val rulesArray = ArrayList<IntellijRule>()

val ic = File(tempDir, "agg-ic.ic")
val smap = File(tempDir, "agg-smap.smap")
val ic = tempDir.resolve("agg-ic.ic")
val smap = tempDir.resolve("agg-smap.smap")

val requests = Request(intellijFilters, ic, smap)
AggregatorApi.aggregate(listOf(requests), reports, outputs)
Expand Down Expand Up @@ -104,23 +104,23 @@ internal object LegacyVerification {
}
}

private fun targetToIntellij(rule: Rule): Target? {
private fun targetToIntellij(rule: Rule): Target {
return when (rule.groupBy) {
GroupingBy.APPLICATION -> Target.ALL
GroupingBy.CLASS -> Target.CLASS
GroupingBy.PACKAGE -> Target.PACKAGE
}
}

private fun counterToIntellij(bound: Bound): Counter? {
private fun counterToIntellij(bound: Bound): Counter {
return when (bound.coverageUnits) {
CoverageUnit.LINE -> Counter.LINE
CoverageUnit.INSTRUCTION -> Counter.INSTRUCTION
CoverageUnit.BRANCH -> Counter.BRANCH
}
}

private fun valueTypeToIntellij(bound: Bound): ValueType? {
private fun valueTypeToIntellij(bound: Bound): ValueType {
return when (bound.aggregationForGroup) {
AggregationType.COVERED_COUNT -> ValueType.COVERED
AggregationType.MISSED_COUNT -> ValueType.MISSED
Expand Down

0 comments on commit 721c753

Please sign in to comment.