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

Update .golangci.yaml and fixed nil pointer dereference. #2943

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

mitchell-as
Copy link
Contributor

@mitchell-as mitchell-as commented Dec 12, 2023

TaskDX-1509 Research a linter that prevents us from committing new changes with unhandled nil pointers

The staticcheck linter is already enabled by default, and so is SA5011 (Possible nil pointer dereference), which appears to do what we need:

internal\runbits\runtime\rationalize.go:21:30: SA5011: possible nil pointer dereference (staticcheck)
        isUpdateErr := errs.Matches(*rerr, &ErrUpdate{})

This PR updates the linter with the termtest refactor and disables warnings about constructing structs with unkeyed fields. It also fixes the nil pointer issue found.

@github-actions github-actions bot changed the base branch from master to version/0-43-0-RC1 December 12, 2023 19:34
@mitchell-as mitchell-as requested a review from MDrakos December 12, 2023 21:15
@mitchell-as mitchell-as marked this pull request as ready for review December 12, 2023 21:15
@mitchell-as mitchell-as merged commit d64ab90 into version/0-43-0-RC1 Dec 13, 2023
7 checks passed
@mitchell-as mitchell-as deleted the mitchell/dx-1509 branch December 13, 2023 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants