Skip to content
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

Needless blank line(s) does not get triggered when there is more than one blank line #108

Closed
vanniktech opened this issue Nov 22, 2017 · 7 comments

Comments

@vanniktech
Copy link
Contributor

Test case:

package com.foo.bar

class Test

@shyiko
Copy link
Collaborator

shyiko commented Nov 22, 2017

@vanniktech

$ printf "package com.foo.bar\n\nclass Test\n\n\n" > T.kt
$ ktlint --version
0.12.1
$ ktlint --relative T.kt 
T.kt:5:1: Needless blank line(s)

@shyiko
Copy link
Collaborator

shyiko commented Nov 22, 2017

Everything seems to be in order.

@shyiko shyiko closed this as completed Nov 22, 2017
@vanniktech
Copy link
Contributor Author

When I'm running it through the gradle plugin I still see no errors.

This is my config file:

[*.{kt,kts}]
indent_size=2
insert_final_newline=true

@shyiko
Copy link
Collaborator

shyiko commented Nov 23, 2017

@vanniktech same thing with .editorconfig in place. Could you please report this issue to the gradle plugin owner/repo?

@vanniktech
Copy link
Contributor Author

The following does get triggered for me:

}
 

While the one below won't be.

}

Could this be an off by one error?

shyiko added a commit that referenced this issue Nov 28, 2017
@shyiko
Copy link
Collaborator

shyiko commented Nov 28, 2017

@vanniktech Thank you. It was a combination of 0a262d5 and 3b9bb1b. Fixed.

@vanniktech
Copy link
Contributor Author

Awesome. Thank you :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants