Skip to content

Commit

Permalink
Fix compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-vinted committed Jun 14, 2024
1 parent 6aac694 commit 9c3fb82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ platformVersion = 2023.2.6

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = org.jetbrains.plugins.ruby:223.8836.39
platformPlugins = org.jetbrains.plugins.ruby:232.10300.40

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ internal class PackwerkAnnotator : ExternalAnnotator<PackwerkAnnotator.State, Pa
return State(file, settings.packwerkPath, fileText, settings.ignoreRecordedViolations)
}

override fun doAnnotate(collectedInfo: State): Results? {
override fun doAnnotate(collectedInfo: State?): Results? {
val collectedInfo = collectedInfo ?: return null

val root: VirtualFile = getRootForFile(collectedInfo.file) ?: return null
val relativePath = VfsUtilCore.getRelativePath(collectedInfo.file.virtualFile, root) ?: return null

Expand Down Expand Up @@ -127,7 +129,9 @@ internal class PackwerkAnnotator : ExternalAnnotator<PackwerkAnnotator.State, Pa
return Results(problems)
}

override fun apply(file: PsiFile, annotationResult: Results, holder: AnnotationHolder) {
override fun apply(file: PsiFile, annotationResult: Results?, holder: AnnotationHolder) {
val annotationResult = annotationResult ?: return

val document = PsiDocumentManager.getInstance(file.project).getDocument(file) ?: return

for (problem in annotationResult.problems) {
Expand Down

0 comments on commit 9c3fb82

Please sign in to comment.