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

Update versions for kotlin and detekt #113

Merged
merged 1 commit into from Nov 21, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
@@ -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
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
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
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
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
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
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)
}
}
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
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
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
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
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
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
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
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
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