Skip to content

SonarQube output format startColumn needs to be zero based #161

Closed
@karlajw

Description

Thank you for creating the issue!

  • [x ] Yes, I've searched similar issues on GitHub and didn't find any.
  • [x ] Yes, I've included all information below (version, config, etc).

Please include the following information:

Version of woke

0.15.0, 0.15.1, 0.16.1

Config file

default config

Go environment
$ go version && go env
# paste output here
Verbose output of running

Woke generated an issue report that has the same value of 'startColumn' and 'endColumn' (both with a value of 1) when there is only one column (ie. file name, java package name)

{
"issues":[
{
"engineId":"woke",
"ruleId":"dummy",
"primaryLocation":{
"message":"Filename finding: dummy may be insensitive, use placeholder, sample instead",
"filePath":"src/main/java/com/testco/pocproject/dummy",
"textRange":{
"startLine":1,
"startColumn":1,
"endColumn":1
}
},
"type":"CODE_SMELL",
"severity":"MAJOR"
},

......

]
}

SonarQube throws the following runtime error when trying to import the above issue format:

ERROR: Error during SonarScanner execution
java.lang.IllegalArgumentException: Start pointer [line=1, lineOffset=1] should be before end pointer [line=1, lineOffset=1]

SonarQube documentation shows the startColumn field as zero based https://docs.sonarqube.org/latest/analysis/generic-issue/

The Hadolint project has had a similar issue eg. hadolint/hadolint#658

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions