#sarif #fmt #cli #terminal

app sarif-fmt

View (pretty print) SARIF files in terminal

12 releases

new 0.2.17 Sep 15, 2021
0.2.15 Jul 6, 2021
0.2.8 Jun 29, 2021

#587 in Command line utilities

Download history 13/week @ 2021-06-20 122/week @ 2021-06-27 35/week @ 2021-07-04 16/week @ 2021-07-18 16/week @ 2021-07-25 23/week @ 2021-08-01 12/week @ 2021-08-08 22/week @ 2021-08-15 15/week @ 2021-09-12

86 downloads per month

MIT license

68KB
1.5K SLoC

Workflow Status

sarif-fmt

This crate provides a command line tool to pretty print SARIF files to easy human readable output.

The latest documentation can be found here.

SARIF or the Static Analysis Results Interchange Format is an industry standard format for the output of static analysis tools. More information can be found on the official website: https://sarifweb.azurewebsites.net/.

Installation

sarif-fmt may be insalled via cargo

cargo install sarif-fmt

Usage

For most cases, simply pipe a SARIF file into sarif-fmt (cat ./foo.sarif | sarif-fmt)

Example

$ cargo clippy --message-format=json | clippy-sarif | sarif-fmt
$ warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
    ┌─ sarif-fmt/src/bin.rs:423:13
    
423 │ ╭             the_rule
424 │ │               .full_description
425 │ │               .as_ref()
426 │ │               .and_then(|mfms| Some(mfms.text.clone()))
     ╰───────────────────────────────────────────────────────^
    
    = `#[warn(clippy::bind_instead_of_map)]` on by default
      for further information visit https://rust-lang.github.io/rust-clippy/master#bind_instead_of_map

License: MIT

Dependencies

~4.5MB
~82K SLoC