Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: init empty result slice for SARIF printer #4758

Merged
merged 2 commits into from
May 27, 2024
Merged

Conversation

Zxilly
Copy link
Contributor

@Zxilly Zxilly commented May 27, 2024

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.

Copy link

boring-cyborg bot commented May 27, 2024

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented May 27, 2024

CLA assistant check
All committers have signed the CLA.

@ldez ldez added bug Something isn't working area: output Related to issue output labels May 27, 2024
@ldez ldez added this to the next milestone May 27, 2024
@ldez ldez changed the title fix: init empty result slice for sarif printer fix: init empty result slice for SARIF printer May 27, 2024
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez merged commit 8173166 into golangci:master May 27, 2024
13 checks passed
@ldez ldez modified the milestones: next, v1.59 Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: output Related to issue output bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants