SARIF Output #
This module provides support for outputting results in SARIF (Static Analysis Results Interchange Format) version 2.1.0.
SARIF specification: https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
SARIF Data Structures #
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
Instances For
Equations
Equations
- Strata.Sarif.instReprArtifactLocation.repr x✝ prec✝ = Std.Format.bracket "{ " (Std.Format.nil ++ Std.Format.text "uri" ++ Std.Format.text " := " ++ (Std.Format.nest 7 (repr x✝.uri)).group) " }"
Instances For
Equations
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
SARIF region representing a source code region with line and column information
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Strata.Sarif.instReprRegion = { reprPrec := Strata.Sarif.instReprRegion.repr }
Equations
Equations
- Strata.Sarif.instToJsonRegion.toJson x✝ = Lean.Json.mkObj [[("startLine", Lean.toJson x✝.startLine)], [("startColumn", Lean.toJson x✝.startColumn)]].flatten
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
SARIF physical location with region information
- artifactLocation : ArtifactLocation
- region : Region
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Strata.Sarif.instToJsonPhysicalLocation.toJson x✝ = Lean.Json.mkObj [[("artifactLocation", Lean.toJson x✝.artifactLocation)], [("region", Lean.toJson x✝.region)]].flatten
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Strata.Sarif.instToJsonSarifLocation.toJson x✝ = Lean.Json.mkObj [[("physicalLocation", Lean.toJson x✝.physicalLocation)]].flatten
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Strata.Sarif.instReprMessage = { reprPrec := Strata.Sarif.instReprMessage.repr }
Equations
- Strata.Sarif.instReprMessage.repr x✝ prec✝ = Std.Format.bracket "{ " (Std.Format.nil ++ Std.Format.text "text" ++ Std.Format.text " := " ++ (Std.Format.nest 8 (repr x✝.text)).group) " }"
Instances For
Equations
Equations
Instances For
Equations
Equations
- Strata.Sarif.instReprLevel = { reprPrec := Strata.Sarif.instReprLevel.repr }
Equations
- Strata.Sarif.instReprLevel.repr Strata.Sarif.Level.none prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Strata.Sarif.Level.none")).group prec✝
- Strata.Sarif.instReprLevel.repr Strata.Sarif.Level.note prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Strata.Sarif.Level.note")).group prec✝
- Strata.Sarif.instReprLevel.repr Strata.Sarif.Level.warning prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Strata.Sarif.Level.warning")).group prec✝
- Strata.Sarif.instReprLevel.repr Strata.Sarif.Level.error prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Strata.Sarif.Level.error")).group prec✝
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Strata.Sarif.instToJsonLevel = { toJson := fun (level : Strata.Sarif.Level) => Lean.Json.str (toString level) }
Equations
- One or more equations did not get rendered due to their size.
SARIF result representing a single verification result
- ruleId : String
Stable identifier of the rule that was evaluated to produce the result -
- level : Level
- message : Message
- locations : Array SarifLocation
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Strata.Sarif.instReprResult = { reprPrec := Strata.Sarif.instReprResult.repr }
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Strata.Sarif.instInhabitedResult = { default := { ruleId := "", level := Strata.Sarif.Level.none, message := { text := "" } } }
Equations
- Strata.Sarif.instReprDriver = { reprPrec := Strata.Sarif.instReprDriver.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
Instances For
Equations
Equations
- Strata.Sarif.instReprTool = { reprPrec := Strata.Sarif.instReprTool.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Equations
Equations
- Strata.Sarif.instInhabitedTool.default = { driver := default }
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Strata.Sarif.instReprRun = { reprPrec := Strata.Sarif.instReprRun.repr }
Equations
Equations
Instances For
Equations
- Strata.Sarif.instFromJsonRun = { fromJson? := Strata.Sarif.instFromJsonRun.fromJson }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Utility Functions #
Convert a location to SARIF format
Equations
Instances For
Convert SARIF document to JSON string
Equations
- Strata.Sarif.toJsonString sarif = (Lean.toJson sarif).compress
Instances For
Convert SARIF document to pretty-printed JSON string
Equations
- Strata.Sarif.toPrettyJsonString sarif = (Lean.toJson sarif).pretty