ktlint-gradle: java.util.NoSuchElementException: Sequence contains no element matching the predicate
Hello,
I’ve updated Ktlint
to 10.2.0
and the plugin
to 0.43.0-SNAPSHOT
but I am getting below error when I run ./gradlew ktlintCheck
> Task :app:runKtlintFormatOverInternalSourceSet FAILED
> Task :app:runKtlintFormatOverDebugSourceSet FAILED
> Task :app:runKtlintFormatOverMainSourceSet FAILED
FAILURE: Build completed with 3 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintFormatOverInternalSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> java.util.NoSuchElementException: Sequence contains no element matching the predicate.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintFormatOverDebugSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> java.util.NoSuchElementException: Sequence contains no element matching the predicate.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:runKtlintFormatOverMainSourceSet'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> java.util.NoSuchElementException: Sequence contains no element matching the predicate.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
45 actionable tasks: 11 executed, 34 up-to-date
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 20 (9 by maintainers)
Hello, please note this issue has been solved for me in version
0.44.0-SNAPSHOT
. Suggesting people here testing out for themselves and then we can close the issue if it is working well for everybody. Thanks!This PR highly likely will fix this issue.