crc-org / vfkit

Apache License 2.0
119 stars 23 forks source link

tools: Update to golangci-lint v1.56.1 #97

Closed cfergeau closed 6 months ago

cfergeau commented 6 months ago

This forces to set the go version to 1.21 in tools/go.mod:

$ go mod tidy -go=1.20 -compat=1.20
go: github.com/GaijinEntertainment/go-exhaustruct/v3@v3.2.0 requires go@1.21, but 1.20 is requested

This commit also fixes these new warnings:

test/vm_test.go:180:19: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
        createDev: func(t *testing.T) (config.VirtioDevice, error) {
                        ^
test/vm_test.go:194:19: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
        createDev: func(t *testing.T) (config.VirtioDevice, error) {
                        ^
test/vm_test.go:201:19: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
        createDev: func(t *testing.T) (config.VirtioDevice, error) {
                        ^
cmd/vfkit/root.go:19:13: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
    RunE: func(cmd *cobra.Command, args []string) error {
               ^
pkg/vf/vsock.go:61:21: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        DialContext: func(ctx context.Context, network, addr string) (conn net.Conn, e error) {
                          ^
pkg/vf/vsock.go:106:42: unused-parameter: parameter 'network' seems to be unused, consider removing or renaming it as _ (revive)
        DialContext: func(ctx context.Context, network, addr string) (conn net.Conn, e error) {
                                               ^
make: *** [lint] Error 1
praveenkumar commented 6 months ago

/lgtm /approve

cfergeau commented 6 months ago

/approve

openshift-ci[bot] commented 6 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cfergeau, praveenkumar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/crc-org/vfkit/blob/main/OWNERS)~~ [cfergeau] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment