Comments (3)
I have added TC for
@Test
fun `does not report when suspend function is called in extension method`() {
val code = """
import kotlinx.coroutines.delay
suspend fun foo() { delay(1000) }
suspend fun String.bar() {
foo()
}
suspend fun String.baz() = foo()
""".trimIndent()
assertThat(subject.compileAndLintWithContext(env, code)).isEmpty()
}
And extension method detection working fine. Are you running detect tasks with the correct type resolution?
from detekt.
Are you running detect tasks with the correct type resolution?
What do you mean by "correct"? But yes, I'm using type resolution in general, i.e. I run the detektMain
task instead of the detekt
task.
from detekt.
Hi @sschuberth it could detekt is unable to determine dbQueryCatching(transactionIsolation, readOnly, block)
as suspend fun. Or can you give complete self-reproducible example where false +ve is coming
from detekt.
Related Issues (20)
- ignoreFailures doesn't work when using gradle workers
- False positive `SwallowedException` when exception is used as a receiver
- Multiline strings may occur parse error HOT 3
- "Missing new line after {" is reported incorrectly in nested lambda
- Incorrect report of error - UnsafeOptInUsageError HOT 2
- MatchingDeclarationName - Not detecting method names - Jetpack Compose HOT 10
- The issue arises when I move the detekt-baseline.xml file from its default path (project/app/detekt-baseline.xml) to a new location (project/config/detekt/detekt-baseline.xml). HOT 3
- MissingPackageDeclaration - Incorrect issue reported. HOT 1
- Add 2.0.0 language version compatibility to detekt-compiler-plugin HOT 2
- Remove deprecated configuration items HOT 4
- autoCorrect not working without "buildUponDefaultConfig = true" HOT 1
- Kotlin 2.0.0: `RuleExtensionsKt.compileAndLintWithContext` fails with `NoScopeRecordCliBindingTrace: method <init>()V not found` HOT 2
- Unable to setup `CoroutineLaunchedInTestWithoutRunTest` rule HOT 4
- False positive on CanBeNonNullable: method with multiple nullables HOT 4
- Forbidden parameter name
- False positive for UnnecessaryParentheses in require + in
- UnusedImport reported for import org.gradle.kotlin.dsl.assign in kotlin-dsl HOT 1
- JVM Target 22 is not supported by detekt HOT 1
- Gradle plugin is no longer compatible with Kotlin 2.0.0 and by Dependency Management Plugin HOT 5
- Support State<Boolean> and Flow<Boolean> for NonBooleanPropertyPrefixedWithIs. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detekt.