jeremymailen / kotlinter-gradle

Painless, fast ktlint plugin for Gradle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Better KtLintParseException error description

avdyushin opened this issue · comments

In case if code (somehow) has compilation issues (e.g. after merge conflicts), running lintKotlin will give this error:

lint worker execution error
com.pinterest.ktlint.core.api.KtLintParseException: 17:5 Expecting member declaration
	at com.pinterest.ktlint.core.internal.RuleExecutionContext$Companion.createRuleExecutionContext$ktlint_core(RuleExecutionContext.kt:137)
...

Which doesn't clear, what file cause this issue.

Yes, good point. Probably we should catch the error from running the ktlint library and wrap it in a better message indicating which file.