-
Notifications
You must be signed in to change notification settings - Fork 506
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
Internal error no-unused-imports #996
Comments
Reproducible with ktlint |
paul-dingemans
pushed a commit
to paul-dingemans/ktlint
that referenced
this issue
Dec 20, 2020
…g is removed (pinterest#996) The no-unused-imports rule fails on the existence of the dot-expression node but for which the actual call to the toString method was removed.
romtsn
added a commit
that referenced
this issue
Dec 21, 2020
…emoved (#1026) * Fix string-template for dot-expression of which the redundant toString is removed (#996) The no-unused-imports rule fails on the existence of the dot-expression node but for which the actual call to the toString method was removed. * Update changelog * Fix code style violation Co-authored-by: Paul Dingemans <pdingemans@bol.com> Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
romtsn
added a commit
to paul-dingemans/ktlint
that referenced
this issue
Mar 7, 2021
…emoved (pinterest#1026) * Fix string-template for dot-expression of which the redundant toString is removed (pinterest#996) The no-unused-imports rule fails on the existence of the dot-expression node but for which the actual call to the toString method was removed. * Update changelog * Fix code style violation Co-authored-by: Paul Dingemans <pdingemans@bol.com> Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
This was referenced Mar 16, 2021
mesopelagique
pushed a commit
to 4d/android-QMobileAPI
that referenced
this issue
Mar 10, 2023
klint failed with wrong message pinterest/ktlint#996
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Observed Behavior
Running ktlint with parameter "-F" produces an internal error "no-unused-imports" on enclosed sample code. Running without parameter "-F" actually produces a helpful message.
Steps to Reproduce
Run "ktlint -F" on code below:
results in:
NoUnsedImportInternalErrorKtlint.kt:1:1: Internal Error (no-unused-imports). Please create a ticket at https://github.com/pinterest/ktlint/issues (if possible, provide the source code that triggered an error) (cannot be auto-corrected)
without parameter "-F", the result is:
NoUnsedImportInternalErrorKtlint.kt:8:65: Redundant "toString()" call in string template
After removing the redundant "toString" the problem is gone.
Your Environment
Ktlint version 0.39.0
MacOs
The text was updated successfully, but these errors were encountered: