Generic issues imported are all labeled as BUGs

  • What are you trying to accomplish?
    I’m unable to import code smells to sonar cloud using the generic issue import format.

I’m importing a set of issues into sonar cloud using the generic issue import format as documented here: Generic issue import format

  • Why does this matter to you?
    I’m trying to use Sonar to track ERC and DRC violations in an Hardware project. I’m labeling some of the issues as BUG and some others as CODE_SMELL. However, once imported into Sonarcloud, they’re all interpreted as BUGs. The priorities however, are being correctly loaded.

  • How would that look in SonarCloud? Alternatives?
    I wish that this bug is fixed. i.e. That I’m able to load code smells into Sonar cloud using the generic issue import format.

Here’s a subset of the json I’m loading:

{
  "issues": [
    {
      "engineId": "electrical_rules_check",
      "ruleId": "lib_symbol_issues",
      "severity": "INFO",
      "type": "CODE_SMELL",
      "primaryLocation": {
        "message": "<the issue description>",
        "filePath": "my-file.sch",
        "textRange": {
          "startLine": 910,
          "endLine": 920,
          "startColumn": 0,
          "endColumn": 1
        }
      },
      "secondaryLocations": []
    },
    {
      "engineId": "electrical_rules_check",
      "ruleId": "pin_to_pin",
      "severity": "MAJOR",
      "type": "BUG",
      "primaryLocation": {
        "message": "<issue description>",
        "filePath": "my-file.sch",
        "textRange": {
          "startLine": 910,
          "endLine": 920,
          "startColumn": 0,
          "endColumn": 1
        }
      },
      "secondaryLocations": [
        {
          "message": "<issue description>",
          "filePath": "my-file.sch",
          "textRange": {
            "startLine": 1306,
            "endLine": 1316,
            "startColumn": 0,
            "endColumn": 1
          }
        }
      ]
    }
  ]
}

Hi,

Could you provide your analysis log, please?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann