Skip to content

Conversation

@alexandear
Copy link
Member

The PR fixes issues reported by staticcheck under the QF* checks:

$ golangci-lint run
pkg/guestagent/kubernetesservice/kubernetesservice.go:143:4: QF1003: could use tagged switch on service.Spec.Type (staticcheck)
                        if service.Spec.Type == corev1.ServiceTypeNodePort {
                        ^
pkg/hostagent/dns/dns.go:83:3: QF1006: could lift into loop condition (staticcheck)
                if seen[cname] {
                ^
2 issues:
* staticcheck: 2

The if seen[cname] { break } condition was not covered by tests, so I added test cases for cyclic definitions.

Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@jandubois jandubois added this to the v1.2.0 milestone Jul 4, 2025
@jandubois jandubois merged commit e05d782 into lima-vm:master Jul 4, 2025
37 of 38 checks passed
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