Skip to content

Commit

Permalink
Update versions for kotlin and detekt (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmans0n authored Nov 21, 2022
1 parent f88615f commit ef507ac
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
kotlin = "1.7.20"
kotlin = "1.7.21"
ktlint = "0.47.1"
detekt = "1.21.0"
detekt = "1.22.0"
junit = "5.9.1"

[libraries]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ComposeCompositionLocalAllowlistCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(1, 13),
SourceLocation(2, 14),
SourceLocation(3, 5),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ComposeCompositionLocalNamingCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(1, 5),
SourceLocation(2, 5)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ComposeContentEmitterReturningValuesCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(2, 5),
SourceLocation(7, 5),
SourceLocation(16, 5)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ComposeModifierReusedCheckTest {

val errors = rule.lint(code)
assertThat(errors)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(3, 5),
SourceLocation(4, 9),
SourceLocation(9, 5),
Expand Down Expand Up @@ -110,7 +110,7 @@ class ComposeModifierReusedCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(6)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(3, 5),
SourceLocation(4, 9),
SourceLocation(9, 5),
Expand Down Expand Up @@ -154,7 +154,7 @@ class ComposeModifierReusedCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(7)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(6, 5),
SourceLocation(8, 9),
SourceLocation(9, 9),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ComposeModifierWithoutDefaultCheckTest {
""".trimIndent()

val errors = rule.lint(composableCode)
assertThat(errors).hasSourceLocations(
assertThat(errors).hasStartSourceLocations(
SourceLocation(2, 15),
SourceLocation(4, 46)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ComposeMultipleContentEmittersCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(2)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(2, 5),
SourceLocation(7, 5)
)
Expand Down Expand Up @@ -114,7 +114,7 @@ class ComposeMultipleContentEmittersCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(2)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(6, 5),
SourceLocation(19, 5)
)
Expand All @@ -141,7 +141,7 @@ class ComposeMultipleContentEmittersCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(1)
.hasSourceLocation(2, 5)
.hasStartSourceLocation(2, 5)
assertThat(errors.first()).hasMessage(ComposeMultipleContentEmitters.MultipleContentEmittersDetected)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ComposeMutableParametersCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(4)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(2, 15),
SourceLocation(4, 15),
SourceLocation(6, 15),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ComposeNamingCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(1)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(2, 5)
)
assertThat(errors.first()).hasMessage(ComposeNaming.ComposablesThatReturnResultsShouldBeLowercase)
Expand All @@ -101,7 +101,7 @@ class ComposeNamingCheckTest {

val errors = rule.lint(code)
assertThat(errors).hasSize(2)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(2, 5),
SourceLocation(5, 5)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ComposeParameterOrderCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(5)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(2, 5),
SourceLocation(5, 5),
SourceLocation(8, 5),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ComposePreviewNamingCheckTest {
annotation class WithBananaPreviews
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSourceLocations(
assertThat(errors).hasStartSourceLocations(
SourceLocation(2, 18),
SourceLocation(4, 18),
SourceLocation(6, 18)
Expand All @@ -84,7 +84,7 @@ class ComposePreviewNamingCheckTest {
annotation class BananaPreview
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSourceLocations(
assertThat(errors).hasStartSourceLocations(
SourceLocation(3, 18),
SourceLocation(6, 18)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ComposePreviewPublicCheckTest {
fun MyComposable() { }
""".trimIndent()
val errors = ruleWithParams.lint(code)
assertThat(errors).hasSourceLocations(
assertThat(errors).hasStartSourceLocations(
SourceLocation(3, 5),
SourceLocation(6, 5)
)
Expand All @@ -83,7 +83,7 @@ class ComposePreviewPublicCheckTest {
}
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSourceLocations(
assertThat(errors).hasStartSourceLocations(
SourceLocation(3, 5),
SourceLocation(7, 5)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ComposeRememberMissingCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(2)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(3, 21),
SourceLocation(6, 45)
)
Expand Down Expand Up @@ -109,7 +109,7 @@ class ComposeRememberMissingCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(2)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(3, 21),
SourceLocation(6, 45)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ComposeUnstableCollectionsCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(2, 18),
SourceLocation(4, 18),
SourceLocation(6, 18)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ComposeViewModelForwardingCheckTest {
}
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(1).hasSourceLocation(3, 5)
assertThat(errors).hasSize(1).hasStartSourceLocation(3, 5)
assertThat(errors.first()).hasMessage(ComposeViewModelForwarding.AvoidViewModelForwarding)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ComposeViewModelInjectionCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(3)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(3, 9),
SourceLocation(7, 9),
SourceLocation(11, 9)
Expand All @@ -95,7 +95,7 @@ class ComposeViewModelInjectionCheckTest {
""".trimIndent()
val errors = rule.lint(code)
assertThat(errors).hasSize(2)
.hasSourceLocations(
.hasStartSourceLocations(
SourceLocation(4, 13),
SourceLocation(6, 13)
)
Expand Down

0 comments on commit ef507ac

Please sign in to comment.