Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.37 KB

run.md

File metadata and controls

55 lines (42 loc) · 1.37 KB

run object

A run object describes a single run of an analysis tool and contains the output of that run.

run object

Example

{
    "$schema": "https://json.schemastore.org/sarif-2.1.0.json",
    "version": "2.1.0",
    "runs": [
        {
            "tool": {
                "driver": {
                    "name": "Psalm",
                    "version": "4.x-dev",
                    "informationUri": "https://psalm.de"
                }
            },
            "properties": {
                "stableId": "Nightly static analysis run"
            },
            "results": []
        }
    ]
}

How to generate

See full examples/run.php script into repository.

Note

Since release 1.5.0, you may use fluent builders API as alternative. See full examples/builder/run.php script into repository.

<?php declare(strict_types=1);

use Bartlett\Sarif\Definition\Run;
use Bartlett\Sarif\Definition\Tool;
use Bartlett\Sarif\Definition\ToolComponent;

$driver = new ToolComponent('Psalm');
$tool = new Tool($driver);

$run = new Run($tool);