-
Notifications
You must be signed in to change notification settings - Fork 507
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
//noinspection in imports throws a lexicographical error #2104
Comments
Hey folks, I'd like to give this a go, if it's still up for grabs :-) |
Go ahead, if you want. |
Hey folks, Could you clarify the expected behaviour of this issue, please?
|
Your example makes the issue more complex assuming that I agree that the
Please reverse engineer the behavior in IntelliJ IDEA default formatting.
If deterministically possible then autocorrect is required
Yes, that seems the correct approach. |
No Kotlin inspection is found which is related to import order. So for now, it is sufficient to keep a
For now, it seems safe to assume that same applies to Kotlin. |
Expected Behavior
ktlint should support
//noinspection
and not fail the import ordering when a suppression on an import line is present: https://pinterest.github.io/ktlint/0.50.0/rules/standard/#import-orderingObserved Behavior
This fails with the following ktlint error:
Imports must be ordered in lexicographic order without any empty lines in-between with "java", "javax", "kotlin" and aliases in the end -- no autocorrection due to comments in the import list (import-ordering)
Steps to Reproduce
Add
//noinspection
comment to suppress a lint check in the list of imports.Your Environment
The text was updated successfully, but these errors were encountered: