From d24bb602a7e56ed500e3157f9a2ca9f39a4b4ac3 Mon Sep 17 00:00:00 2001 From: Paul Dingemans Date: Tue, 13 Aug 2024 09:12:20 +0200 Subject: [PATCH] Fix rule id in documentation (#2768) Closes #2765 --- .../release-latest/docs/rules/experimental.md | 12 ++++++------ documentation/snapshot/docs/rules/experimental.md | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/documentation/release-latest/docs/rules/experimental.md b/documentation/release-latest/docs/rules/experimental.md index 54b0115896..5c13e752a3 100644 --- a/documentation/release-latest/docs/rules/experimental.md +++ b/documentation/release-latest/docs/rules/experimental.md @@ -8,9 +8,9 @@ ktlint_experimental=enabled ``` Also see [enable/disable specific rules](../configuration-ktlint/#disabled-rules). -## Blank lines between when-conditions +## Blank line between when-conditions -Consistently add or remove blank lines between when-conditions in a when-statement. A blank line is only added between when-conditions if the when-statement contains at lease one multiline when-condition. If a when-statement only contains single line when-conditions, then the blank lines between the when-conditions are removed. +Consistently add or remove blank line between when-conditions in a when-statement. A blank line is only added between when-conditions if the when-statement contains at lease one multiline when-condition. If a when-statement only contains single line when-conditions, then the blank lines between the when-conditions are removed. !!! note Ktlint uses `.editorconfig` property `ij_kotlin_line_break_after_multiline_when_entry` but applies it also on single line entries to increase consistency. @@ -107,22 +107,22 @@ Consistently add or remove blank lines between when-conditions in a when-stateme |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------:|:-------------:|:--------------:| | `ij_kotlin_line_break_after_multiline_when_entry`
Despite its name, forces a blank line between single line and multiline when-entries when at least one multiline when-entry is found in the when-statement. | `true` | `true` | `true` | -Rule id: `standard:blank-lines-between-when-conditions` +Rule id: `standard:blank-line-between-when-conditions` Suppress or disable rule (1) { .annotate } 1. Suppress rule in code with annotation below: ```kotlin - @Suppress("ktlint:standard:blank-lines-between-when-conditions") + @Suppress("ktlint:standard:blank-line-between-when-conditions") ``` Enable rule via `.editorconfig` ```editorconfig - ktlint_standard_blank-lines-between-when-conditions = enabled + ktlint_standard_blank-line-between-when-conditions = enabled ``` Disable rule via `.editorconfig` ```editorconfig - ktlint_standard_blank-lines-between-when-conditions = disabled + ktlint_standard_blank-line-between-when-conditions = disabled ``` ## KDoc diff --git a/documentation/snapshot/docs/rules/experimental.md b/documentation/snapshot/docs/rules/experimental.md index 54b0115896..5c13e752a3 100644 --- a/documentation/snapshot/docs/rules/experimental.md +++ b/documentation/snapshot/docs/rules/experimental.md @@ -8,9 +8,9 @@ ktlint_experimental=enabled ``` Also see [enable/disable specific rules](../configuration-ktlint/#disabled-rules). -## Blank lines between when-conditions +## Blank line between when-conditions -Consistently add or remove blank lines between when-conditions in a when-statement. A blank line is only added between when-conditions if the when-statement contains at lease one multiline when-condition. If a when-statement only contains single line when-conditions, then the blank lines between the when-conditions are removed. +Consistently add or remove blank line between when-conditions in a when-statement. A blank line is only added between when-conditions if the when-statement contains at lease one multiline when-condition. If a when-statement only contains single line when-conditions, then the blank lines between the when-conditions are removed. !!! note Ktlint uses `.editorconfig` property `ij_kotlin_line_break_after_multiline_when_entry` but applies it also on single line entries to increase consistency. @@ -107,22 +107,22 @@ Consistently add or remove blank lines between when-conditions in a when-stateme |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------:|:-------------:|:--------------:| | `ij_kotlin_line_break_after_multiline_when_entry`
Despite its name, forces a blank line between single line and multiline when-entries when at least one multiline when-entry is found in the when-statement. | `true` | `true` | `true` | -Rule id: `standard:blank-lines-between-when-conditions` +Rule id: `standard:blank-line-between-when-conditions` Suppress or disable rule (1) { .annotate } 1. Suppress rule in code with annotation below: ```kotlin - @Suppress("ktlint:standard:blank-lines-between-when-conditions") + @Suppress("ktlint:standard:blank-line-between-when-conditions") ``` Enable rule via `.editorconfig` ```editorconfig - ktlint_standard_blank-lines-between-when-conditions = enabled + ktlint_standard_blank-line-between-when-conditions = enabled ``` Disable rule via `.editorconfig` ```editorconfig - ktlint_standard_blank-lines-between-when-conditions = disabled + ktlint_standard_blank-line-between-when-conditions = disabled ``` ## KDoc