Open
Description
Describe the bug
Diktat
resolves locations/physicalLocation/region
for UNUSED_IMPORT always to 1:1
:
{
"level": "error",
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "save-demo/src/main/kotlin/com/saveourtool/save/demo/SaveDemo.kt",
"uriBaseId": "%SRCROOT%"
},
"region": {
"startColumn": 1,
"startLine": 1
}
}
}
],
"message": {
"text": "[UNUSED_IMPORT] unused imports should be removed: org.springframework.http.ResponseEntity - unused import"
},
"ruleId": "diktat-ruleset:file-structure"
},
Expected behavior
Sarif report is generated with invalid locations/physicalLocation/region
Observed behavior
Project has diktat's issues, the gradle plugin generates a sarif report. Github doesn't show annotations with some errors, but shows for another
Steps to Reproduce
Environment information
- diktat version: 1.2.5
- build tool (maven/gradle): gradle
- how is diktat run (CLI, plugin, etc.):
- kotlin version: 1.8.10
- operating system: -
- link to a project (if your project is public): save-cloud (Update all non-major dependencies (except core Kotlin) save-cloud#2003)