golangci / golangci-lint

Fast linters runner for Go
https://golangci-lint.run
GNU General Public License v3.0
14.85k stars 1.34k forks source link

fix: init empty result slice for SARIF printer #4758

Closed Zxilly closed 1 month ago

Zxilly commented 1 month ago

if no issue is found, the sarif printer will produce a nil as a result, and encoding/json makes it a null, which is required to be an array in sarif format.

see https://github.com/Zxilly/go-size-analyzer/actions/runs/9254489826/job/25456396105 for real-world errors.

boring-cyborg[bot] commented 1 month ago

Hey, thank you for opening your first Pull Request !

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.