Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit f6d307c

Browse files
committed
sanitise filenames
1 parent a2990ee commit f6d307c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Dependencies._
22

33
name := "sbt-codacy-coverage"
44

5-
version := "1.0.3"
5+
version := "1.0.4"
66

77
scalaVersion := "2.10.4"
88

src/main/scala/com/codacy/parsers/CoberturaParser.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ class CoberturaParser(coberturaFile: File, rootProject: File) {
6666
key -> value
6767
}
6868

69-
CodacyCoverageFileReport(sourceFilename.stripPrefix(rootProjectDir), fileHit, lineHitMap)
69+
CodacyCoverageFileReport(sanitiseFilename(sourceFilename), fileHit, lineHitMap)
70+
}
71+
72+
private def sanitiseFilename(filename: String): String = {
73+
filename.stripPrefix(rootProjectDir).replaceAll( """\\/""", "/")
7074
}
7175

7276
}

0 commit comments

Comments
 (0)