-
Notifications
You must be signed in to change notification settings - Fork 458
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
SpotlessKotlin error output is missing line numbers #249
Comments
You can throw any subclass of |
Cool. I'm a bit confused as how the mechanism that groups errors using DiffMessageFormatter works. It seems to work for java based errors but not kotlin errors. Is there a reason why? |
There's two kinds of formatter:
Spotless is built around (1), because it's the kind of fix which is easy for users to deal with. Those work with DiffMessageFormatter, which shows the diff that would be applied if you called Spotless also supports (2), but it's not possible to do as much with it, because all we have to work with is an error, there's no suggested fix. |
Released in |
When spotlessKotlin fails it ouputs a large stacktrace which makes it hard to figure out which line number failed.
It would be nice to have an output similar to the spotlessJava task but at the very least to include the line numbers where the task failed.
Here is an example stacktrace from a failed kotlin task.
I would be happy to work on this but I'm not quite sure what the best way to format the output would be. I see that this exception is thrown on KtLintStep.java:110 and that the
LintError
object includes the line and column number.Is there a better way to throw the exception other than
AssertionError
?The text was updated successfully, but these errors were encountered: