Skip to content

Conversation

@danmar
Copy link
Owner

@danmar danmar commented Oct 26, 2025

No description provided.

@danmar
Copy link
Owner Author

danmar commented Oct 26, 2025

@mario-campos I guess you might be interested in this PR. The Sarif output from Cppcheck will sometimes provide a partialFingerprints for warnings. It's rarelly provided today but I hope we can provide it more in the future.

Example:

{
  "$schema": "https:\/\/docs.oasis-open.org\/sarif\/sarif\/v2.1.0\/errata01\/os\/schemas\/sarif-schema-2.1.0.json",
  "runs": [
    {
      "results": [
        {
          "level": "error",
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "test1.c"
                },
                "region": {
                  "endColumn": 14,
                  "endLine": 3,
                  "startColumn": 14,
                  "startLine": 3
                }
              }
            }
          ],
          "message": {
            "text": "Ensure that operations on signed integers do not result in overflow"
          },
          "partialFingerprints": {
            "hash": "11638054069549063377",
            "id": "premium-cert-int32-c"
          },
          "ruleId": "premium-cert-int32-c"
        }
      ],
      "tool": {
        "driver": {
          "informationUri": "https:\/\/cppcheck.sourceforge.io",
          "name": "Cppcheck",
          "rules": [
            {
              "defaultConfiguration": {
                "level": "error"
              },
              "fullDescription": {
                "text": ""
              },
              "help": {
                "text": ""
              },
              "id": "premium-cert-int32-c",
              "name": "",
              "properties": {
                "precision": "high",
                "problem.severity": "error"
              },
              "shortDescription": {
                "text": ""
              }
            }
          ],
          "semanticVersion": "2.19"
        }
      }
    }
  ],
  "version": "2.1.0"
}

@mario-campos
Copy link
Contributor

Hey, @danmar. I provided some minor nitpicks, but I agree—it would be nice to see that SARIF output more complete. Nice job!

@sonarqubecloud
Copy link

@danmar danmar merged commit f3d9a37 into danmar:main Nov 1, 2025
55 checks passed
@danmar danmar deleted the fix-14225 branch November 1, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants