Skip to content

Commit

Permalink
Fix sonar rule key extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
pplam committed Jul 2, 2024
1 parent c8d9f26 commit e1c7e04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ai.devchat.core.handlers

import ai.devchat.core.*
import ai.devchat.core.BaseActionHandler
import ai.devchat.core.DevChatActions
import com.alibaba.fastjson.JSONObject


Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/ai/devchat/plugin/IDEServer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class IDEServer(private var project: Project) {
else -> "unknown"
}
val sonarRuleKey = issue.action?.text?.let{
sonarRuleKeyRegex.find(it)?.value
sonarRuleKeyRegex.find(it)?.groups?.get(1)?.value
}
"${issue.description} <<$source:$sonarRuleKey>>"
}))
Expand Down

0 comments on commit e1c7e04

Please sign in to comment.