Skip to content

Commit

Permalink
Fix blank line before declarations rule code example (#2657)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Dingemans <[email protected]>
  • Loading branch information
k-taro56 and paul-dingemans authored May 19, 2024
1 parent 238f9f3 commit 7d0536a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 26 deletions.
22 changes: 9 additions & 13 deletions documentation/release-latest/docs/rules/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,45 +60,41 @@ Requires a blank line before any class or function declaration. No blank line is

```kotlin
const val FOO_1 = "foo1"

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

fun bar1() {
val foo4 = "foo4"
val foo5 = "foo5"
}

fun bar2() = "bar"

val foo6 = "foo3"
val foo7 = "foo4"

enum class Foo
}
```

=== "[:material-heart-off-outline:](#) Disallowed"

```kotlin
const val foo1 = "foo1"
const val FOO_1 = "foo1"

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

fun bar1() {
val foo4 = "foo4"
val foo5 = "foo5"
val foo4 = "foo4"
val foo5 = "foo5"
}

fun bar2() = "bar"

val foo6 = "foo3"
val foo7 = "foo4"

enum class Foo {}
enum class Foo
}
```

Expand Down
22 changes: 9 additions & 13 deletions documentation/snapshot/docs/rules/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,45 +60,41 @@ Requires a blank line before any class or function declaration. No blank line is

```kotlin
const val FOO_1 = "foo1"

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

fun bar1() {
val foo4 = "foo4"
val foo5 = "foo5"
}

fun bar2() = "bar"

val foo6 = "foo3"
val foo7 = "foo4"

enum class Foo
}
```

=== "[:material-heart-off-outline:](#) Disallowed"

```kotlin
const val foo1 = "foo1"
const val FOO_1 = "foo1"

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

fun bar1() {
val foo4 = "foo4"
val foo5 = "foo5"
val foo4 = "foo4"
val foo5 = "foo5"
}

fun bar2() = "bar"

val foo6 = "foo3"
val foo7 = "foo4"

enum class Foo {}
enum class Foo
}
```

Expand Down

0 comments on commit 7d0536a

Please sign in to comment.