Miha-x64 / Mikes_IDEA_extensions

IntelliJ IDEA: missing parts.
Apache License 2.0
34 stars 7 forks source link

ktNoinlineFunc appears on valid (?) code #6

Closed BorzdeG closed 4 years ago

BorzdeG commented 4 years ago

plugin version: 0.10 IDEA version: IntelliJ IDEA 2020.1 Beta (Build #IU-201.6668.13) Kotlin version: 1.3.70

import org.gradle.api.Project
import org.gradle.api.artifacts.component.ModuleComponentIdentifier

internal fun getDependencies(project: Project): List<ModuleComponentIdentifier> {
    return project.configurations.asSequence().filter {
        it.isCanBeResolved && !it.name.endsWith("Metadata")
    }.map {
        it.resolvedConfiguration.resolvedArtifacts
    }.flatten().distinct().map {
        it.id.componentIdentifier
    }.filterIsInstance(ModuleComponentIdentifier::class.java).toList()
}
image
Miha-x64 commented 4 years ago

Yep, this inspection does not say it's invalid. It warns that function is not inline so anonymous class will be declared and instantiated. That's why it is a ‘weak warning’, and that's why it highlights only a single character. If it still annoys you, just turn it off.