We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecbebb9 commit 50f7057Copy full SHA for 50f7057
pkg/printers/sarif.go
@@ -68,11 +68,6 @@ func NewSarif(w io.Writer) *Sarif {
68
}
69
70
func (p Sarif) Print(issues []result.Issue) error {
71
- output := SarifOutput{
72
- Version: sarifVersion,
73
- Schema: sarifSchemaURI,
74
- }
75
-
76
run := sarifRun{}
77
run.Tool.Driver.Name = "golangci-lint"
78
@@ -104,7 +99,11 @@ func (p Sarif) Print(issues []result.Issue) error {
104
99
run.Results = append(run.Results, sr)
105
100
106
101
107
- output.Runs = []sarifRun{run}
102
+ output := SarifOutput{
103
+ Version: sarifVersion,
+ Schema: sarifSchemaURI,
+ Runs: []sarifRun{run},
+ }
108
109
return json.NewEncoder(p.w).Encode(output)
110
0 commit comments