Skip to content

Commit

Permalink
Fix `blank line before declarations' rule code example
Browse files Browse the repository at this point in the history
  • Loading branch information
k-taro56 committed May 15, 2024
1 parent 238f9f3 commit d41a852
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
19 changes: 7 additions & 12 deletions documentation/release-latest/docs/rules/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ Requires a blank line before any class or function declaration. No blank line is
=== "[:material-heart:](#) Ktlint"

```kotlin
const val FOO_1 = "foo1"
const val foo1 = "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
}
```
Expand All @@ -83,22 +83,17 @@ Requires a blank line before any class or function declaration. No blank line is

```kotlin
const val foo1 = "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
19 changes: 7 additions & 12 deletions documentation/snapshot/docs/rules/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ Requires a blank line before any class or function declaration. No blank line is
=== "[:material-heart:](#) Ktlint"

```kotlin
const val FOO_1 = "foo1"
const val foo1 = "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
}
```
Expand All @@ -83,22 +83,17 @@ Requires a blank line before any class or function declaration. No blank line is

```kotlin
const val foo1 = "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 d41a852

Please sign in to comment.