Skip to content

Commit

Permalink
pass verifier checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurnikov committed Jul 21, 2024
1 parent add701d commit 4c15bd7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
14 changes: 10 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ fun prop(name: String): String =
extra.properties[name] as? String
?: error("Property `$name` is not defined in gradle.properties for environment `$shortPlatformVersion`")

fun propOrNull(name: String): String? = extra.properties[name] as? String

fun gitCommitHash(): String {
val byteOut = ByteArrayOutputStream()
project.exec {
Expand Down Expand Up @@ -104,6 +106,7 @@ allprojects {
intellijPlatform {
create(prop("platformType"), prop("platformVersion"), useInstaller = useInstaller)
testFramework(TestFrameworkType.Platform)
pluginVerifier()
bundledPlugin("org.toml.lang")
jetbrainsRuntimeExplicit("jbr_jcef-17.0.11-linux-x64-b1207.30")
}
Expand Down Expand Up @@ -158,11 +161,14 @@ allprojects {
}

verifyPlugin {
if ("SNAPSHOT" !in shortPlatformVersion) {
ides {
ide(prop("verifierIdeVersion").trim())
}
ides {
recommended()
}
// if ("SNAPSHOT" !in shortPlatformVersion) {
// ides {
// ide(prop("verifierIdeVersion").trim())
// }
// }
failureLevel.set(
EnumSet.complementOf(
EnumSet.of(
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/org/move/cli/MoveProjectsService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.intellij.openapi.util.EmptyRunnable
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileManager
import com.intellij.openapi.vfs.ex.temp.TempFileSystem
import com.intellij.openapi.vfs.ex.temp.TempFileSystemMarker
import com.intellij.psi.PsiDirectory
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiFile
Expand Down Expand Up @@ -166,7 +166,7 @@ class MoveProjectsService(val project: Project): Disposable {
val cached = this.fileToMoveProjectCache.get(file)
if (cached is CacheEntry.Present) return cached.value

if (isUnitTestMode && file.fileSystem is TempFileSystem) return MoveProject.forTests(project)
if (isUnitTestMode && file.fileSystem is TempFileSystemMarker) return MoveProject.forTests(project)

val filePath = file.toNioPathOrNull() ?: return null

Expand Down
4 changes: 0 additions & 4 deletions src/main/kotlin/org/move/lang/MoveFile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,5 @@ fun VirtualFile.toMoveFile(project: Project): MoveFile? = this.toPsiFile(project

fun VirtualFile.toTomlFile(project: Project): TomlFile? = this.toPsiFile(project) as? TomlFile

fun MoveFile.isTempFile(): Boolean =
this.virtualFile == null
|| this.virtualFile.fileSystem is TempFileSystem

inline fun <reified T : PsiElement> PsiFile.elementAtOffset(offset: Int): T? =
this.findElementAt(offset)?.ancestorOrSelf<T>()

0 comments on commit 4c15bd7

Please sign in to comment.