Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] int to Int migration #2767

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions documentation/release-latest/docs/rules/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions documentation/snapshot/docs/rules/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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()
Expand All @@ -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)
Expand All @@ -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) {
Expand All @@ -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)
Expand All @@ -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) {
Expand All @@ -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)
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down