Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better KtLintParseException error description #333

Open
avdyushin opened this issue Jun 5, 2023 · 1 comment
Open

Better KtLintParseException error description #333

avdyushin opened this issue Jun 5, 2023 · 1 comment

Comments

@avdyushin
Copy link

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.

@jeremymailen
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants