Skip to content

Commit

Permalink
Change the logic for detecting new dependencies on IdeaVim plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPl292 committed Mar 29, 2024
1 parent 8c1103c commit bfcf706
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripts/src/main/kotlin/scripts/checkNewPluginDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,13 @@ suspend fun main() {
}
val output = response.body<List<String>>().toSet()
println(output)
if (knownPlugins != output) {
val newPlugins = (output - knownPlugins).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
val removedPlugins = (knownPlugins - output.toSet()).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
val newPlugins = (output - knownPlugins).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
if (newPlugins.isNotEmpty()) {
// val removedPlugins = (knownPlugins - output.toSet()).map { it to (getPluginLinkByXmlId(it) ?: "Can't find plugin link") }
error(
"""
Unregistered plugins:
${if (newPlugins.isNotEmpty()) newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No unregistered plugins"}
Removed plugins:
${if (removedPlugins.isNotEmpty()) removedPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" } else "No removed plugins"}
${newPlugins.joinToString(separator = "\n") { it.first + "(" + it.second + ")" }}
""".trimIndent()
)
}
Expand Down

0 comments on commit bfcf706

Please sign in to comment.