diff --git a/documentation/release-latest/docs/rules/standard.md b/documentation/release-latest/docs/rules/standard.md index 3835384960..dff1aa6858 100644 --- a/documentation/release-latest/docs/rules/standard.md +++ b/documentation/release-latest/docs/rules/standard.md @@ -1041,7 +1041,7 @@ If at least one branch of an if-else statement or an if-else-if statement is wra === "[:material-heart:](#) Ktlint" ```kotlin - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) { doSomething() } else if (value < 0) { @@ -1055,7 +1055,7 @@ If at least one branch of an if-else statement or an if-else-if statement is wra === "[:material-heart-off-outline:](#) Disallowed" ```kotlin - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) doSomething() else if (value < 0) { diff --git a/documentation/snapshot/docs/rules/standard.md b/documentation/snapshot/docs/rules/standard.md index 3835384960..dff1aa6858 100644 --- a/documentation/snapshot/docs/rules/standard.md +++ b/documentation/snapshot/docs/rules/standard.md @@ -1041,7 +1041,7 @@ If at least one branch of an if-else statement or an if-else-if statement is wra === "[:material-heart:](#) Ktlint" ```kotlin - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) { doSomething() } else if (value < 0) { @@ -1055,7 +1055,7 @@ If at least one branch of an if-else statement or an if-else-if statement is wra === "[:material-heart-off-outline:](#) Disallowed" ```kotlin - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) doSomething() else if (value < 0) { diff --git a/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/AnnotationRuleTest.kt b/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/AnnotationRuleTest.kt index 47a499216a..2e6bb20410 100644 --- a/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/AnnotationRuleTest.kt +++ b/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/AnnotationRuleTest.kt @@ -338,10 +338,10 @@ class AnnotationRuleTest { val code = """ fun foo( - a: int, - @Bar1 b: int, - @Bar1 @Bar2 c: int, - @Bar3("bar3") @Bar1 d: int + a: Int, + @Bar1 b: Int, + @Bar1 @Bar2 c: Int, + @Bar3("bar3") @Bar1 d: Int ) {} """.trimIndent() annotationRuleAssertThat(code).hasNoLintViolations() @@ -608,7 +608,8 @@ class AnnotationRuleTest { annotationRuleAssertThat(code).hasNoLintViolations() } - @Nested inner class `Array syntax annotations, Issue #1765` { + @Nested + inner class `Array syntax annotations, Issue #1765` { @Test fun `annotation preceded by array syntax annotation`() { val code = diff --git a/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/IfElseBracingRuleTest.kt b/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/IfElseBracingRuleTest.kt index d0b026b7cf..f121573708 100644 --- a/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/IfElseBracingRuleTest.kt +++ b/ktlint-ruleset-standard/src/test/kotlin/com/pinterest/ktlint/ruleset/standard/rules/IfElseBracingRuleTest.kt @@ -196,7 +196,7 @@ class IfElseBracingRuleTest { inner class `Given an IF with ELSE-IF` { private val formattedCode = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) { doSomething() } else if (value < 0) { @@ -211,7 +211,7 @@ class IfElseBracingRuleTest { fun `Given all branches without-braces then do not reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) doSomething() else if (value < 0) doSomethingElse() @@ -227,7 +227,7 @@ class IfElseBracingRuleTest { fun `Given if { -- } else if -- else -- then reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) { doSomething() } else if (value < 0) @@ -249,7 +249,7 @@ class IfElseBracingRuleTest { fun `Given if -- else if { -- } else -- then reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) doSomething() else if (value < 0) { @@ -271,7 +271,7 @@ class IfElseBracingRuleTest { fun `Given if -- else if -- else { -- } then reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) doSomething() else if (value < 0) @@ -294,7 +294,7 @@ class IfElseBracingRuleTest { fun `Given if { -- } else if { -- } else -- then reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) { doSomething() } else if (value < 0) { @@ -314,7 +314,7 @@ class IfElseBracingRuleTest { fun `Given if { -- } else if -- else { -- } then reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) { doSomething() } else if (value < 0) @@ -335,7 +335,7 @@ class IfElseBracingRuleTest { fun `Given if -- else if { -- } else { -- } then reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) doSomething() else if (value < 0) { @@ -356,7 +356,7 @@ class IfElseBracingRuleTest { fun `Given all branches with braces then do not reformat`() { val code = """ - fun foo(value: int) { + fun foo(value: Int) { if (value > 0) { doSomething() } else if (value < 0) {