Skip to content

Commit

Permalink
fix line numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
NikkyAI committed Apr 20, 2024
1 parent 331027d commit c329c53
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ public fun Workflow.findDependencyDeclaration(action: RegularAction<*>): Pair<Pa
val line =
file?.let { sourceFile ->
val currentCoordinates = action.mavenCoordinatesForAction()
sourceFile.readText().lines().indexOfFirst { line ->
line.contains("\"$currentCoordinates\"")
}
val index =
sourceFile.readText().lines().indexOfFirst { line ->
line.contains("\"$currentCoordinates\"")
}
index + 1
}

return file to line
}

0 comments on commit c329c53

Please sign in to comment.