-
Notifications
You must be signed in to change notification settings - Fork 503
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
Placing // ktlint-disable
at top of file crashes ktlint
#1029
Comments
I could not reproduce it neither with build from // ktlint-disable
fun test() {} Have you tried to run ktlint CLI over failing file (maybe it is a bug in Gradle plugin)? Could you provide more information? |
I think it must be the package statement.
fails for me on 0.40.0 with
|
Yes, with |
Seems not a |
According to the documentation, the directive should be placed as EOL comment after the package statement. That also resulted in a problem, but has been fixed in this PR. |
The statement Use below to suppress all rules in the entire file:
or provide a named list of rules to suppress in the entire file:
|
Disable all rules or a list of specific rules in the entire file (#1029)
Step to Reproduce
Pick any kotlin file add at the very top add
// ktlint-disable
Run ktlint lint
Following Stacktrace will be printed out
The text was updated successfully, but these errors were encountered: