Feature: Add SARIF Support for URL Checker #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR introduces SARIF support to the
urlchecker-python
tool. SARIF is a standardized format for static analysis results, which improves integration with various tools and workflows, enabling better reporting and issue tracking in CI/CD pipelines.How to Use
The new feature allows users to save URL-checking results in SARIF format by specifying the output format during the command execution:
$ urlchecker check --save results.sarif --format sarif .
The default behavior remains unaffected, with CSV being the default output format. Users can still generate CSV reports without any changes to their current workflow.
Under the Hood
save_results_as_sarif
to theUrlChecker
class, generating SARIF logs.save_results_format
parameter to specify the desired output format (csv
orsarif
).Unit Tests
Included unit tests to verify the SARIF output functionality, ensuring the new format is correctly generated and validated.