Skip to content

Commit d09344d

Browse files
committed
Fix formatting and ReturnCount error
1 parent d6c5afa commit d09344d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/main/kotlin/org/javacs/kt/signaturehelp/SignatureHelp.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ import org.jetbrains.kotlin.psi.KtDotQualifiedExpression
2020
import org.jetbrains.kotlin.psi.KtNameReferenceExpression
2121
import org.jetbrains.kotlin.psi.psiUtil.startOffset
2222
import org.javacs.kt.LOG
23-
import kotlin.math.abs
2423

2524
fun fetchSignatureHelpAt(file: CompiledFile, cursor: Int): SignatureHelp? {
2625
val (signatures, activeSignature, activeParameter) = getSignatureTriplet(file, cursor) ?: return nullResult("No call around ${file.describePosition(cursor)}")
27-
return SignatureHelp(signatures, activeSignature,activeParameter)
26+
return SignatureHelp(signatures, activeSignature, activeParameter)
2827
}
2928

3029
/**
@@ -42,6 +41,7 @@ fun getDocString(file: CompiledFile, cursor: Int): String {
4241
}
4342

4443
// TODO better function name?
44+
@Suppress("ReturnCount")
4545
private fun getSignatureTriplet(file: CompiledFile, cursor: Int): Triple<List<SignatureInformation>, Int?, Int?>? {
4646
val call = file.parseAtPoint(cursor)?.findParent<KtCallExpression>() ?: return null
4747
val candidates = candidates(call, file)
@@ -127,6 +127,7 @@ private fun isCompatibleWith(call: KtCallExpression, candidate: CallableDescript
127127
return true
128128
}
129129

130+
@Suppress("ReturnCount")
130131
private fun activeParameter(call: KtCallExpression, cursor: Int): Int? {
131132
val args = call.valueArgumentList ?: return null
132133
val text = args.text

0 commit comments

Comments
 (0)