Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-dingemans committed Feb 17, 2024
1 parent ba6dbfb commit a727f26
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions documentation/snapshot/docs/rules/experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -648,3 +648,37 @@ Braces required for multiline for, while, and do statements.
```

Rule id: `multiline-loop` (`standard` rule set)

## Square brackets spacing

Check for spacing around square brackets.

=== "[:material-heart:](#) Ktlint"

```kotlin
val foo1 = bar[1]
val foo2 =
bar[
1,
2,
]

@Foo(
fooBar = ["foo", "bar"],
fooBaz = [
"foo",
"baz",
],
)
fun foo() {}
```

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

```kotlin
val foo1 = bar [1]
val foo2 = bar[ 1]
val foo3 = bar[1 ]
```

Rule id: `square-brackets-spacing` (`standard` rule set)

0 comments on commit a727f26

Please # to comment.