From 8fc7101be30b55aa5f2ac49c49a86500c508a99e Mon Sep 17 00:00:00 2001 From: Bruno Costa Date: Wed, 8 Jan 2025 09:33:46 -0300 Subject: [PATCH] Fix annotator issue --- CHANGELOG.md | 2 ++ .../cljstuffplugin/cljkondo/Diagnostics.kt | 20 ++++++++++++++++++- .../extensions/CljKondoAnnotator.kt | 4 +++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae2f5c2..b87ea95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ # clojure-extras-plugin Changelog ## [Unreleased] +- Fix annotator issue +## 0.8.1 - Upgrade plugin for IJ 2024.3 - Update Built-in clj-kondo -> v2024.11.14 diff --git a/src/main/kotlin/com/github/brcosta/cljstuffplugin/cljkondo/Diagnostics.kt b/src/main/kotlin/com/github/brcosta/cljstuffplugin/cljkondo/Diagnostics.kt index 3063264..5682919 100644 --- a/src/main/kotlin/com/github/brcosta/cljstuffplugin/cljkondo/Diagnostics.kt +++ b/src/main/kotlin/com/github/brcosta/cljstuffplugin/cljkondo/Diagnostics.kt @@ -2,28 +2,46 @@ package com.github.brcosta.cljstuffplugin.cljkondo import com.fasterxml.jackson.annotation.JsonProperty -data class Diagnostics(val findings: List, val summary: Summary?) +data class Diagnostics( + @JsonProperty("findings") + val findings: List, + + @JsonProperty("summary") + val summary: Summary? +) data class Finding( + @JsonProperty("row") val row: Int, @JsonProperty("end-row") val endRow: Int, + @JsonProperty("col") val col: Int, @JsonProperty("end-col") val endCol: Int, + @JsonProperty("level") val level: String, + @JsonProperty("filename") val filename: String?, @JsonProperty("class") val clazz: String?, + @JsonProperty("message") val message: String, + @JsonProperty("type") val type: String, ) data class Summary( + @JsonProperty("files") var files: Int?, + @JsonProperty("type") val type: String?, + @JsonProperty("error") val error: Int?, + @JsonProperty("warning") val warning: Int?, + @JsonProperty("info") val info: Int?, + @JsonProperty("duration") val duration: Int? ) diff --git a/src/main/kotlin/com/github/brcosta/cljstuffplugin/extensions/CljKondoAnnotator.kt b/src/main/kotlin/com/github/brcosta/cljstuffplugin/extensions/CljKondoAnnotator.kt index 9179b77..cf4b447 100644 --- a/src/main/kotlin/com/github/brcosta/cljstuffplugin/extensions/CljKondoAnnotator.kt +++ b/src/main/kotlin/com/github/brcosta/cljstuffplugin/extensions/CljKondoAnnotator.kt @@ -39,7 +39,9 @@ class CljKondoAnnotator : ExternalAnnotator