From 453db28bd10eec04cda31c06ff24b8a3fb160911 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:43:03 +1000 Subject: [PATCH] Fix compilation error Caused by #6390 being merged after #6397 without a rebase first --- .../gitlab/arturbosch/detekt/formatting/FormattingRule.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/detekt-formatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/FormattingRule.kt b/detekt-formatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/FormattingRule.kt index 802a85db6010..84a0b1082d2a 100644 --- a/detekt-formatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/FormattingRule.kt +++ b/detekt-formatting/src/main/kotlin/io/gitlab/arturbosch/detekt/formatting/FormattingRule.kt @@ -91,10 +91,10 @@ abstract class FormattingRule(config: Config) : Rule(config) { // The node used to report the finding may be not the same used for the offset (e.g. in NoUnusedImports). val (line, column) = positionByOffset(offset) val location = Location( - SourceLocation(line, column), + source = SourceLocation(line, column), // Use offset + 1 since ktlint always reports a single location. - TextLocation(offset, offset + 1), - root.toFilePath() + text = TextLocation(offset, offset + 1), + filePath = root.toFilePath() ) val entity = Entity.from(node.psi, location)