Skip to content

Commit

Permalink
Introduce in-memory problem registrar
Browse files Browse the repository at this point in the history
  • Loading branch information
novotnyr committed Jul 31, 2024
1 parent 9e35148 commit 668a99e
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.jetbrains.plugin.structure.mocks

import com.jetbrains.plugin.structure.base.problems.PluginProblem
import com.jetbrains.plugin.structure.intellij.verifiers.ProblemRegistrar

class SimpleProblemRegistrar : ProblemRegistrar {
private val _problems = mutableListOf<PluginProblem>()

val problems: List<PluginProblem>
get() = _problems

override fun registerProblem(problem: PluginProblem) {
_problems += problem
}

fun reset() {
_problems.clear()
}
}

0 comments on commit 668a99e

Please sign in to comment.