You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to format this code with the experimental AnnotationRule enabled causes this crash:
com.pinterest.ktlint.core.RuleExecutionException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at com.pinterest.ktlint.core.KtLint$format$1.invoke(KtLint.kt:384)
at com.pinterest.ktlint.core.KtLint$format$1.invoke(KtLint.kt:41)
at com.pinterest.ktlint.core.KtLint$visitor$2$2.invoke(KtLint.kt:279)
at com.pinterest.ktlint.core.KtLint$visitor$2$2.invoke(KtLint.kt:41)
at com.pinterest.ktlint.core.KtLint.visit(KtLint.kt:536)
at com.pinterest.ktlint.core.KtLint.visit(KtLint.kt:537)
at com.pinterest.ktlint.core.KtLint.visit(KtLint.kt:537)
at com.pinterest.ktlint.core.KtLint.access$visit(KtLint.kt:41)
at com.pinterest.ktlint.core.KtLint$visitor$2.invoke(KtLint.kt:278)
at com.pinterest.ktlint.core.KtLint$visitor$2.invoke(KtLint.kt:41)
at com.pinterest.ktlint.core.KtLint.format(KtLint.kt:367)
at com.pinterest.ktlint.internal.FileUtilsKt.formatFile(FileUtils.kt:79)
at com.pinterest.ktlint.KtlintCommandLine$run$1.invoke(Main.kt:240)
at com.pinterest.ktlint.KtlintCommandLine$run$4$1.call(Main.kt:306)
at com.pinterest.ktlint.KtlintCommandLine$run$4$1.call(Main.kt:115)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1929)
at com.pinterest.ktlint.ruleset.experimental.AnnotationRule.visit(AnnotationRule.kt:97)
at com.pinterest.ktlint.core.KtLint$format$1.invoke(KtLint.kt:372)
... 18 more
The text was updated successfully, but these errors were encountered:
Sample code:
Trying to format this code with the experimental AnnotationRule enabled causes this crash:
The text was updated successfully, but these errors were encountered: