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

Declarations of classes and functions should be separated with blank line #1939

Closed
paul-dingemans opened this issue Apr 12, 2023 · 0 comments · Fixed by #2055
Closed

Declarations of classes and functions should be separated with blank line #1939

paul-dingemans opened this issue Apr 12, 2023 · 0 comments · Fixed by #2055

Comments

@paul-dingemans
Copy link
Collaborator

Declarations, except consecutive declarations of properties, should be separated by a blank line.

const val foo1 = "foo1"
class FooBar {
    val foo2 = "foo2"
    val foo3 = "foo3"
    fun bar1() {
    }
    fun bar2() = "bar"
    val foo3 = "foo3"
    val foo4 = "foo4"
    enum Foo {}
}

should be formatted as:

const val foo1 = "foo1"

class FooBar {
    val foo2 = "foo2"
    val foo3 = "foo3"

    fun bar1() {
    }

    fun bar2() = "bar"

    val foo3 = "foo3"
    val foo4 = "foo4"

    enum Foo {}
@paul-dingemans paul-dingemans added this to the 1.0 (Yeah!) milestone Apr 16, 2023
@paul-dingemans paul-dingemans self-assigned this May 23, 2023
paul-dingemans added a commit that referenced this issue May 24, 2023
…requires a blank line before class, function or property declarations

Closes #1939
@paul-dingemans paul-dingemans modified the milestones: 1.0 (Yeah!), 0.50.0 May 27, 2023
paul-dingemans added a commit that referenced this issue May 28, 2023
…requires a blank line before class, function or property declarations (#2055)

Closes #1939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant