-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
NullPointerException when Ktlint runs the rule multiline-expression-wrapping
during formatting
#2297
Comments
The problematic statement is following:
and specifically, the line starting with Change your code as follows to work around this problem for now:
The problem above can be reproduced with simplified example:
|
Thanks for the quick answer, the insights, and the workaround. I will apply it in waiting for the fix. |
Expected Behavior
The rule should at least pass without errors and tell me if there are linting issues or not
Observed Behavior
When running the command
mvn antrun:run@ktlint-format
with this configuration in thepom.xml
:I'm getting the error :
(I copy-pasted the interesting parts of the stack trace but if you want the full stack-trace, please tell me)
Steps to Reproduce
I'm linking to this issue 2 files where the exception arises at position 0:0, since i don't know where the bug comes from exactly in the files, I can't reduce the size of the code sample. Sorry for that
KtFilesWithError.zip
My Environment
1.0.0
Windows 11 Professional Version 10.0.22621 Build 22621
The text was updated successfully, but these errors were encountered: