Closed jiriproX closed 1 year ago
It looks like linter issue. I've tried to change golangci-lint version in Makefile.
It seems to help. When will be new sriov-cni version with go 1.20 support available?
Greetings!
we are periodically bumping golang, currently there is no ETA for updating to go 1.20.
PRs are welcome to bump golangci-lint version :)
PR #245 was merged sriov-cni was bumped to require golang 1.20. closing this one.
We are using sriov-cni version 2.7.0 We bumped golang version from 1.19.3 to latest version 1.20. Following build error appeared.
/usr/bin/gmake Running gofmt... Running golangci-lint... WARN [linters context] bodyclose is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/g WARN [linters context] gosimple is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/go WARN [linters context] staticcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci WARN [linters context] structcheck is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci WARN [linters context] unused is disabled because of go1.18. You can track the evolution of the go1.18 support by following the https://github.com/golangci/gola pkg/sriov/mocks/pci_utils_mock.go:14:12: _m.Called undefined (type PciUtils has no field or method Called) (typecheck) ret := _m.Called(ifName) ^ pkg/sriov/mocks/pci_utils_mock.go:28:12: _m.Called undefined (type PciUtils has no field or method Called) (typecheck) ret := _m.Called(ifName, vf) ^ pkg/sriov/mocks/pci_utils_mock.go:49:12: _m.Called undefined (type PciUtils has no field or method Called) (typecheck) ret := _m.Called(ifName) ^ pkg/sriov/mocks/pci_utils_mock.go:101:26: mock.AssertExpectations undefined (type PciUtils has no field or method AssertExpectations) (typecheck) t.Cleanup(func() { mock.AssertExpectations(t) }) ^ pkg/utils/mocks/netlink_manager_mock.go:20:12: _m.Called undefined (type NetlinkManager has no field or method Called) (typecheck) ret := _m.Called(_a0) ^ pkg/utils/mocks/netlink_manager_mock.go:43:12: _m.Called undefined (type NetlinkManager has no field or method Called) (typecheck) ret := _m.Called(_a0) ^ pkg/utils/mocks/netlink_manager_mock.go:57:12: _m.Called undefined (type NetlinkManager has no field or method Called) (typecheck) ret := _m.Called(_a0, _a1) ^ pkg/utils/mocks/netlink_manager_mock.go:219:26: mock.AssertExpectations undefined (type NetlinkManager has no field or method AssertExpectations) (typecheck) t.Cleanup(func() { mock.AssertExpectations(t) }) ^ pkg/utils/mocks/pci_allocator_mock.go:14:12: _m.Called undefined (type PCIAllocation has no field or method Called) (typecheck) ret := _m.Called(_a0) ^ pkg/utils/mocks/pci_allocator_mock.go:28:12: _m.Called undefined (type PCIAllocation has no field or method Called) (typecheck) ret := _m.Called(_a0) ^ pkg/utils/mocks/pci_allocator_mock.go:56:12: _m.Called undefined (type PCIAllocation has no field or method Called) (typecheck) ret := _m.Called(_a0, _a1) ^ pkg/utils/mocks/pci_allocator_mock.go:78:26: mock.AssertExpectations undefined (type PCIAllocation has no field or method AssertExpectations) (typecheck) t.Cleanup(func() { mock.AssertExpectations(t) }) ^ pkg/config/config_suitetest.go:16:9: undefined: BeforeSuite (typecheck) var = BeforeSuite(func() { ^ pkg/config/config_suitetest.go:22:9: undefined: AfterSuite (typecheck) var = AfterSuite(func() { ^ pkg/config/configtest.go:11:9: undefined: Describe (typecheck) var = Describe("Config", func() { ^ pkg/config/config_suite_test.go:12:2: undefined: RegisterFailHandler (typecheck) RegisterFailHandler(Fail) ^ pkg/config/config_suite_test.go:13:2: undefined: RunSpecs (typecheck) RunSpecs(t, "Config Suite") ^ pkg/config/config_suite_test.go:19:2: undefined: Expect (typecheck) Expect(err).Should(Succeed()) ^ pkg/config/config_suite_test.go:24:2: undefined: Expect (typecheck) Expect(err).Should(Succeed()) ^ pkg/config/config_test.go:12:2: undefined: Context (typecheck) Context("Checking LoadConf function", func() { ^ pkg/config/config_test.go:13:3: undefined: It (typecheck) It("Assuming correct config file - existing DeviceID", func() { ^ pkg/config/config_test.go:29:4: undefined: Expect (typecheck) Expect(err).NotTo(HaveOccurred()) ^ pkg/config/config_test.go:31:3: undefined: It (typecheck) It("Assuming incorrect config file - not existing DeviceID", func() { ^ pkg/config/config_test.go:49:3: undefined: It (typecheck) It("Assuming incorrect config file - broken json", func() { ^ pkg/config/config_test.go:111:2: undefined: Context (typecheck) Context("Checking getVfInfo function", func() { ^ pkg/sriov/sriov_suitetest.go:16:9: undefined: BeforeSuite (typecheck) var = BeforeSuite(func() { ^ pkg/sriov/sriov_suitetest.go:22:9: undefined: AfterSuite (typecheck) var = AfterSuite(func() { ^ pkg/sriov/sriovtest.go:34:9: undefined: Describe (typecheck) var = Describe("Sriov", func() { ^ pkg/sriov/sriov_suite_test.go:12:2: undefined: RegisterFailHandler (typecheck) RegisterFailHandler(Fail) ^ pkg/sriov/sriov_suite_test.go:13:2: undefined: RunSpecs (typecheck) RunSpecs(t, "Sriov Suite") ^ pkg/sriov/sriov_test.go:36:5: undefined: GinkgoTInterface (typecheck) t GinkgoTInterface ^ pkg/sriov/sriov_test.go:38:2: undefined: BeforeEach (typecheck) BeforeEach(func() { ^ pkg/sriov/sriov_test.go:39:7: undefined: GinkgoT (typecheck) t = GinkgoT() ^ pkg/sriov/sriov_test.go:42:2: undefined: Context (typecheck) Context("Checking SetupVF function", func() { ^ pkg/sriov/sriov_test.go:49:3: undefined: BeforeEach (typecheck) BeforeEach(func() { ^ pkg/sriov/sriov_test.go:61:8: undefined: GinkgoT (typecheck) t = GinkgoT() ^ pkg/sriov/sriov_test.go:144:3: undefined: BeforeEach (typecheck) BeforeEach(func() { ^ pkg/utils/pci_allocatortest.go:11:9: undefined: Describe (typecheck) var = Describe("PCIAllocator", func() { ^ pkg/utils/utils_suitetest.go:15:9: undefined: BeforeSuite (typecheck) var = BeforeSuite(func() { ^ pkg/utils/utils_suitetest.go:21:9: undefined: AfterSuite (typecheck) var = AfterSuite(func() { ^ pkg/utils/pci_allocator_test.go:15:2: undefined: AfterEach (typecheck) AfterEach(func() { ^ pkg/utils/utils_suite_test.go:11:2: undefined: RegisterFailHandler (typecheck) RegisterFailHandler(Fail) ^ pkg/utils/utils_suite_test.go:12:2: undefined: RunSpecs (typecheck) RunSpecs(t, "Utils Suite") ^ gmake: *** [Makefile:128: lint] Error 1