Skip to content

Commit

Permalink
chore: fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
kmruiz committed Jan 16, 2025
1 parent 1493e93 commit 0508c95
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.mongodb.jbplugin.mql.components.HasSourceDialect
import com.mongodb.jbplugin.observability.TelemetryEvent
import com.mongodb.jbplugin.observability.TelemetryEvent.InspectionStatusChangeEvent.InspectionType
import com.mongodb.jbplugin.observability.TelemetryService
import com.mongodb.jbplugin.observability.probe.InspectionStatusChangedProbe.UniqueInspection
import com.mongodb.jbplugin.observability.useLogMessage
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
Expand All @@ -24,11 +25,13 @@ import java.util.UUID
private val inspectionTelemetry = Dispatchers.IO
private val logger: Logger = logger<InspectionStatusChangedProbe>()

internal typealias ProblemsByInspectionType = MutableMap<InspectionType, MutableList<UniqueInspection>>

@Service
class InspectionStatusChangedProbe(
private val cs: CoroutineScope
) {
private data class UniqueInspection(val id: UUID, val on: WeakReference<Node<PsiElement>>) {
internal data class UniqueInspection(val id: UUID, val on: WeakReference<Node<PsiElement>>) {
companion object {
fun new(query: Node<PsiElement>): UniqueInspection {
return UniqueInspection(UUID.randomUUID(), WeakReference(query))
Expand All @@ -37,9 +40,7 @@ class InspectionStatusChangedProbe(
}

private val mutex: Mutex = Mutex()

private val problemsByInspectionType: MutableMap<InspectionType, MutableList<UniqueInspection>> =
mutableMapOf()
private val problemsByInspectionType: ProblemsByInspectionType = mutableMapOf()

fun inspectionChanged(inspectionType: InspectionType, query: Node<PsiElement>) {
val dialect = query.component<HasSourceDialect>() ?: return
Expand Down

0 comments on commit 0508c95

Please sign in to comment.