Skip to content

Added SARIF formatter#821

Merged
carlio merged 6 commits into
prospector-dev:masterfrom
kostiantyn-priv:add_sarif_formatter
Jun 21, 2026
Merged

Added SARIF formatter#821
carlio merged 6 commits into
prospector-dev:masterfrom
kostiantyn-priv:add_sarif_formatter

Conversation

@kostiantyn-priv

@kostiantyn-priv kostiantyn-priv commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

Add SARIF formatter

Related Issue

#820

Motivation and Context

When running prospector on GitHub CI/CD, it is not possible to use its report as is, because GitHub uses the "SARIF report format", which is not supported.

How Has This Been Tested?

I tested these changes and got the expected result.

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My change requires a change to the dependencies
  • I have updated the dependencies accordingly
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Comment thread prospector/formatters/sarif.py Outdated
"""

def render(self, summary: bool = True, messages: bool = True, profile: bool = False) -> str:
output: list[dict[str, Any]] = []

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks to b build but never used, did I miss something?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please review the current version of changes

@sbrunner sbrunner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good any remark @carlio @Pierre-Sassoulas?

Comment thread docs/usage.rst Outdated

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM :)

@kostiantyn-priv

Copy link
Copy Markdown
Contributor Author

If everything is ok, please merge the pull request.

Thanks!

@carlio

carlio commented Jun 21, 2026

Copy link
Copy Markdown
Member

Yep LGTM too, I'll merge

@carlio carlio merged commit 36d2282 into prospector-dev:master Jun 21, 2026
6 checks passed
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.

4 participants