java.lang.IllegalArgumentException: Count 'n' must be non-negative, but was -1.
See original GitHub issueHello!
When I run ./gradlew ktlintFormat
I have the error
Execution failed for task ':runKtlintFormatOverKotlinScripts'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> java.lang.IllegalArgumentException: Count 'n' must be non-negative, but was -1.
My config
plugins {
id("org.jlleitschuh.gradle.ktlint") version "10.3.0"
}
ktlint {
version.set(0.45.2)
android.set(true)
filter {
exclude("**/build/**")
exclude("**/resources/**")
exclude("**/generated/**")
}
reporters {
reporter(ReporterType.CHECKSTYLE)
}
}
Issue Analytics
- State:
- Created a year ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Exception in thread "main" java.lang.IllegalArgumentException
According to the error message, the parameter must be positive. This could be because during expandMaze, you are assigning counts[1] to be ...
Read more >Negative spacing during indent formatting #1188 - GitHub
Caused by: java.lang.IllegalArgumentException: Count 'n' must be non-negative, but was -4. at kotlin.text.
Read more >How to solve an IllegalArgumentException in Java?
Reasons for java.lang.IllegalArgumentException. When Arguments out of range. For example, the percentage should lie between 1 to 100.
Read more >Main.java Source code - Java2s.com
OpenVPN-Settings is distributed in the hope that it will be useful, * but ... < 0) { throw new IllegalArgumentException("Skip count must be...
Read more >Spigot - SimpleScore | Animated Scoreboard | Page 10
java.lang.IllegalArgumentException: Count 'n' must be non-negative, but was -157. at com.r4g3baby.simplescore.shaded.kotlin.text.StringsKt__ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue can be reproduced by writing something like this:
But writing it like this work:
Hello @JLLeitschuh I’m blocked again by this issue I’ve checked again and can say this time that the issue has been fixed upstream. Can you release an update with ktlint 0.47.1 ?