Skip to content

Commit

Permalink
Update rx-coroutines interop lint message
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-slack committed Oct 2, 2024
1 parent 493e0d1 commit 64beaef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ internal class DenyListedApiDetector : Detector(), SourceCodeScanner, XmlScanner
className = "kotlinx.coroutines.rx3.RxCompletableKt",
functionName = "rxCompletable",
errorMessage =
"rxCompletable defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way.",
"rxCompletable defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic.",
parameters =
listOf(
"kotlin.coroutines.CoroutineContext",
Expand All @@ -383,7 +383,7 @@ internal class DenyListedApiDetector : Detector(), SourceCodeScanner, XmlScanner
className = "kotlinx.coroutines.rx3.RxMaybeKt",
functionName = "rxMaybe",
errorMessage =
"rxMaybe defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way.",
"rxMaybe defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic.",
parameters =
listOf(
"kotlin.coroutines.CoroutineContext",
Expand All @@ -395,7 +395,7 @@ internal class DenyListedApiDetector : Detector(), SourceCodeScanner, XmlScanner
className = "kotlinx.coroutines.rx3.RxSingleKt",
functionName = "rxSingle",
errorMessage =
"rxSingle defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way.",
"rxSingle defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic.",
parameters =
listOf(
"kotlin.coroutines.CoroutineContext",
Expand All @@ -407,7 +407,7 @@ internal class DenyListedApiDetector : Detector(), SourceCodeScanner, XmlScanner
className = "kotlinx.coroutines.rx3.RxObservableKt",
functionName = "rxObservable",
errorMessage =
"rxObservable defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way.",
"rxObservable defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic.",
parameters =
listOf(
"kotlin.coroutines.CoroutineContext",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ class DenyListedApiDetectorTest : BaseSlackLintTest() {
.run()
.expect(
"""
src/foo/SomeClass.kt:6: Error: rxCompletable defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way. [DenyListedApi]
src/foo/SomeClass.kt:6: Error: rxCompletable defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic. [DenyListedApi]
val now = rxCompletable {}
~~~~~~~~~~~~~
1 errors, 0 warnings
Expand Down Expand Up @@ -478,7 +478,7 @@ class DenyListedApiDetectorTest : BaseSlackLintTest() {
.run()
.expect(
"""
src/foo/SomeClass.kt:6: Error: rxSingle defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way. [DenyListedApi]
src/foo/SomeClass.kt:6: Error: rxSingle defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic. [DenyListedApi]
val now = rxSingle { "a" }
~~~~~~~~
1 errors, 0 warnings
Expand Down Expand Up @@ -510,7 +510,7 @@ class DenyListedApiDetectorTest : BaseSlackLintTest() {
.run()
.expect(
"""
src/foo/SomeClass.kt:6: Error: rxMaybe defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way. [DenyListedApi]
src/foo/SomeClass.kt:6: Error: rxMaybe defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic. [DenyListedApi]
val now = rxMaybe { "a" }
~~~~~~~
1 errors, 0 warnings
Expand Down Expand Up @@ -544,7 +544,7 @@ class DenyListedApiDetectorTest : BaseSlackLintTest() {
.run()
.expect(
"""
src/foo/SomeClass.kt:6: Error: rxObservable defaults to Dispatchers.Default, which will silently introduce multithreading. Provide an explicit dispatcher. Dispatchers.Unconfined is usually the best choice, as it behaves in an rx-y way. [DenyListedApi]
src/foo/SomeClass.kt:6: Error: rxObservable defaults to Dispatchers.Default. Provide an explicit dispatcher which can be replaced with a test dispatcher to make your tests more deterministic. [DenyListedApi]
val now = rxObservable { send("a") }
~~~~~~~~~~~~
1 errors, 0 warnings
Expand Down

0 comments on commit 64beaef

Please sign in to comment.