From 8d2ab6d3ea3c98f4b83d05233e703938c3f8ab2d Mon Sep 17 00:00:00 2001 From: Denis Karmyshakov Date: Thu, 10 Jan 2019 15:23:56 +0300 Subject: [PATCH] Fix file path in Detekt reports --- gradle/commonStaticAnalysis.gradle | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gradle/commonStaticAnalysis.gradle b/gradle/commonStaticAnalysis.gradle index 951f7e3..4d11e42 100644 --- a/gradle/commonStaticAnalysis.gradle +++ b/gradle/commonStaticAnalysis.gradle @@ -162,10 +162,7 @@ appendKotlinErrors = { count, checkstyleFile -> } count++ - def error = errorNode.attribute("source") - def rootDir = project.rootDir.toString() - def rootDirWithoutAppName = rootDir.substring(0, rootDir.lastIndexOf("/") + 1) - appendError(count, "Detekt", "${rootDirWithoutAppName}${fileNode.attribute("name")}", errorNode.attribute("line"), error, "", errorNode.attribute("message")) + appendError(count, "Detekt", fileNode.attribute("name"), errorNode.attribute("line"), errorNode.attribute("source"), "", errorNode.attribute("message")) } } return count @@ -368,4 +365,4 @@ dependencies { checkstyle 'ru.touchin:checkstyle:7.6.2-fork' pngtastic 'com.github.depsypher:pngtastic:1.2' -} \ No newline at end of file +}