-
Notifications
You must be signed in to change notification settings - Fork 166
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
Improve error messages output when running tasks #313
Comments
@Tapchicoma do we even have the information required to do this? |
Generally, I think it is possible. Probably will require some changes in ktlint itself. |
I initially thought this was an issue with AGP, but it is actually a problem caused by KTLint-gradle plugin This problem is very easy to reproduce. When building the sample project, the build window will report the following false failure:
However, if you run Is there a way to pipe the output of KTLint to the build window? |
Even a message hinting about where the report files with further details can be found would be useful for Kotlin and/or Lint noobs like me |
Problem Description
When running ktlintCheck or ktlintFormat, if code style errors are found, the error message is not specific when the task fails, just mentioning a non-zero exit value after running the
JavaExec
in the runLint task.This can cause some confusion and it's not very specific.
Suggested Solution:
Output error message when ktlintCheck finds code style errors:
"Ktlint found X code styles errors, please fix them before continuing"
Output error message when ktlintFormat is not able to auto-correct:
"Ktlint found X code styles errors that couldn't be auto-corrected, please fix them before continuing"
The text was updated successfully, but these errors were encountered: