Skip to content

Commit

Permalink
Merge pull request #83 from brcosta/fix-annotator
Browse files Browse the repository at this point in the history
Fix annotator issue
  • Loading branch information
brcosta authored Jan 8, 2025
2 parents f82a0fb + 8fc7101 commit 47436b4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,46 @@ package com.github.brcosta.cljstuffplugin.cljkondo

import com.fasterxml.jackson.annotation.JsonProperty

data class Diagnostics(val findings: List<Finding>, val summary: Summary?)
data class Diagnostics(
@JsonProperty("findings")
val findings: List<Finding>,

@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?
)
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ class CljKondoAnnotator : ExternalAnnotator<ExternalLintAnnotationInput, Externa
private val separators = " )".toCharArray()

private val mapper: ObjectMapper =
ObjectMapper().registerModule(kotlinModule()).configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
ObjectMapper().registerModule(kotlinModule())
// .registerModule(ParameterNamesModule())
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)

override fun collectInformation(file: PsiFile): ExternalLintAnnotationInput? {
return collectInformation(file, null)
Expand Down

0 comments on commit 47436b4

Please sign in to comment.