Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enrich messages of SARIF results #13180

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

RussellLuo
Copy link
Contributor

Closes #13179.

After this patch, we'll get more informative messages as below:

{
  "$schema": "https://json.schemastore.org/sarif-2.1.0.json",
  "runs": [
    {
      "results": [
        {
          "level": "error",
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {...},
                "region": {
                  "endColumn": 10,
                  "endLine": 1,
                  "startColumn": 8,
                  "startLine": 1
                }
              }
            }
          ],
          "message": {
            "text": "`os` imported but unused"
          },
          "ruleId": "F401"
        },
        {
          "level": "error",
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {...},
                "region": {
                  "endColumn": 34,
                  "endLine": 4,
                  "startColumn": 11,
                  "startLine": 4
                }
              }
            }
          ],
          "message": {
            "text": "`.format` call is missing argument(s) for placeholder(s): name"
          },
          "ruleId": "F524"
        }
      ],
      "tool": {...}
    }
  ],
  "version": "2.1.0"
}

Copy link

codspeed-hq bot commented Aug 31, 2024

CodSpeed Performance Report

Merging #13180 will not alter performance

Comparing RussellLuo:enrich-sarif-message (8c25f9c) with main (3ceedf7)

Summary

✅ 32 untouched benchmarks

Copy link
Contributor

github-actions bot commented Aug 31, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@MichaReiser MichaReiser added the cli Related to the command-line interface label Sep 1, 2024
@MichaReiser MichaReiser merged commit dd5d0d5 into astral-sh:main Sep 1, 2024
20 checks passed
@RussellLuo RussellLuo deleted the enrich-sarif-message branch September 1, 2024 12:30
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cli Related to the command-line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enrich messages of SARIF results
2 participants