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

Suggestion: Needless blank line(s) additions #65

Closed
vanniktech opened this issue Jul 6, 2017 · 8 comments
Closed

Suggestion: Needless blank line(s) additions #65

vanniktech opened this issue Jul 6, 2017 · 8 comments
Labels

Comments

@vanniktech
Copy link
Contributor

The check, Needless blank line(s), flags the following code:

}


private fun something() { }

although I'd also expect it to flag the one below as well:

  }

}

since the newline between the } is not necessary.

@shyiko
Copy link
Collaborator

shyiko commented Jul 6, 2017

Hi @vanniktech.

While I like the idea, I'm note sure Intellij built-in formatter supports this (there is a setting for Java (Code Style -> Java -> Blank Lines -> Before '}') which can be set to 0 to enforce this kind of style, but not for Kotlin) (at least not in IDEA 2016.3). It's pretty easy to implement but I'd prefer not to add anything that can't be enforced by the IDEA's formatter (if we can).

@vanniktech
Copy link
Contributor Author

vanniktech commented Jul 7, 2017

@shyiko
Copy link
Collaborator

shyiko commented Jul 7, 2017

@vanniktech 👍

@vanniktech
Copy link
Contributor Author

Will this mean this functionality will be added now or once 1.1.4 is out?

@shyiko
Copy link
Collaborator

shyiko commented Jul 7, 2017

I think we should hold off until 1.1.4 is out (just to be on the safe side).

@vanniktech
Copy link
Contributor Author

Kotlin 1.1.4 is out

@shyiko
Copy link
Collaborator

shyiko commented Oct 22, 2017

Change contributed by @Ilya-Gh 🎉.
Keeping this issue open until ktlint-intellij-idea-integration is updated & a new release is published.

@vanniktech
Copy link
Contributor Author

This can be closed now. Thanks :)

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

No branches or pull requests

2 participants