Skip to content
Snippets Groups Projects
Commit c5177de2 authored by renovate_bot's avatar renovate_bot Committed by Fabian Seidl
Browse files

[renovate] Update golangci/golangci-lint Docker tag to v1.62.0


See merge request !1100

Co-authored-by: default avatarFabian Seidl <fabian.seidl@h-da.de>
Co-authored-by: default avatarRenovate Bot <renovate@danet.fbi.h-da.de>
parent 1ca484e1
No related branches found
No related tags found
1 merge request!1100[renovate] Update golangci/golangci-lint Docker tag to v1.62.0
Pipeline #231456 passed
code-quality:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.61.0-alpine
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.62.0-alpine
stage: analyze
script:
# writes golangci-lint output to gl-code-quality-report.json
......
......@@ -18,7 +18,7 @@ PLUGIN_NAME= bundled_plugin.zip
# Tool Versions
GOTESTSUM_VERSION=v1.8.1
GOLANGCI_LINT_VERSION=v1.60.2
GOLANGCI_LINT_VERSION=v1.62.0
MOCKERY_VERSION=v2.20.0
YGOT_GENERATOR_VERSION=v0.27.0
YGOT_GENERATOR_GENERATOR_VERSION=v0.0.4
......
......@@ -45,7 +45,7 @@ func Unmarshal(bytes []byte, path *gpb.Path, goStruct ygot.GoStruct, opt ...ytyp
func unmarshal(schema *ytypes.Schema, bytes []byte, path *gpb.Path, goStruct ygot.GoStruct, opt ...ytypes.UnmarshalOpt) error {
defer func() {
if r := recover(); r != nil {
log.Error(r.(error))
log.Error(r.(error)) //nolint:errcheck
}
}()
......
......@@ -25,7 +25,7 @@ func Unmarshal(bytes []byte, path *gpb.Path, goStruct ygot.GoStruct, opt ...ytyp
func unmarshal(schema *ytypes.Schema, bytes []byte, path *gpb.Path, goStruct ygot.GoStruct, opt ...ytypes.UnmarshalOpt) error {
defer func() {
if r := recover(); r != nil {
fmt.Println(r.(error))
fmt.Println(r.(error)) //nolint:errcheck
}
}()
......
......@@ -58,8 +58,8 @@ func getTestPndServer(t *testing.T) *PndServer {
UUID: mneUUID,
}
mockNetworkElement.(*nucleus.CommonNetworkElement).SetTransport(&mocks.Transport{})
mockNetworkElement.(*nucleus.CommonNetworkElement).SetName(hostname)
mockNetworkElement.(*nucleus.CommonNetworkElement).SetTransport(&mocks.Transport{}) //nolint:errcheck
mockNetworkElement.(*nucleus.CommonNetworkElement).SetName(hostname) //nolint:errcheck
mockChange := &mocks.Change{}
mockChange.On("Age").Return(time.Hour)
......
......@@ -47,12 +47,12 @@ func TestGnmi_Capabilities(t *testing.T) {
capabilityRequest := &gpb.CapabilityRequest{}
transport.client.(*mocks.GNMIClient).
On("NewContext", mockContext, mock.Anything).
Return(mockContext)
transport.client.(*mocks.GNMIClient).
On("Capabilities", mockContext, capabilityRequest).
Return(capabilityResponse, nil)
transport.client.(*mocks.GNMIClient). //nolint:errcheck
On("NewContext", mockContext, mock.Anything).
Return(mockContext)
transport.client.(*mocks.GNMIClient). //nolint:errcheck
On("Capabilities", mockContext, capabilityRequest).
Return(capabilityResponse, nil)
type fields struct {
transport *Gnmi
......@@ -142,15 +142,15 @@ func TestGnmi_Get(t *testing.T) {
Extension: nil,
}
transport.client.(*mocks.GNMIClient).
On("NewContext", mockContext, mock.Anything).
Return(mockContext)
transport.client.(*mocks.GNMIClient).
On("NewGetRequest", mockContext, mock.Anything, mock.Anything).
Return(getRequest, nil)
transport.client.(*mocks.GNMIClient).
On("Get", mockContext, mock.Anything).
Return(getResponse, nil)
transport.client.(*mocks.GNMIClient). //nolint:errcheck
On("NewContext", mockContext, mock.Anything).
Return(mockContext)
transport.client.(*mocks.GNMIClient). //nolint:errcheck
On("NewGetRequest", mockContext, mock.Anything, mock.Anything).
Return(getRequest, nil)
transport.client.(*mocks.GNMIClient). //nolint:errcheck
On("Get", mockContext, mock.Anything).
Return(getResponse, nil)
type fields struct {
transport *Gnmi
......@@ -357,8 +357,8 @@ func TestGnmi_Set(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tt.fields.transport.client.(*mocks.GNMIClient).
On("Set", mockContext, tt.fields.mockArgumentMatcher).Return(setResponse, nil)
tt.fields.transport.client.(*mocks.GNMIClient). //nolint:errcheck
On("Set", mockContext, tt.fields.mockArgumentMatcher).Return(setResponse, nil)
err := tt.fields.transport.Set(tt.args.ctx, tt.args.payload)
if (err != nil) != tt.wantErr {
t.Errorf("Set() error = %v, wantErr %v", err, tt.wantErr)
......
......@@ -124,9 +124,9 @@ func TestDeleteAllPlugins(t *testing.T) {
t.Error(err)
}
mockPlugin1 := mockPlugin(t)
mockPlugin1.(*mocks.Plugin).On("ID").Return(mockPlugin1ID)
mockPlugin1.(*mocks.Plugin).On("ID").Return(mockPlugin1ID) //nolint:errcheck
mockPlugin2 := mockPlugin(t)
mockPlugin2.(*mocks.Plugin).On("ID").Return(mockPlugin2ID)
mockPlugin2.(*mocks.Plugin).On("ID").Return(mockPlugin2ID) //nolint:errcheck
inputPlugins := [2]plugin.Plugin{mockPlugin1, mockPlugin2}
......
......@@ -27,7 +27,7 @@ import (
// The output includes a package header which is generated.
func write(ctx context.Context, code *gogen.GeneratedCode, path string, sbiType spb.Type) error {
if err := os.Mkdir(path, 0755); err != nil {
if err.(*fs.PathError).Err.Error() != "file exists" { //nolint:errorlint
if err.(*fs.PathError).Err.Error() != "file exists" { //nolint:errorlint,errcheck
return err
}
}
......
......@@ -39,7 +39,7 @@ func Unmarshal(bytes []byte, path *gpb.Path, goStruct ygot.GoStruct, opt ...ytyp
func unmarshal(schema *ytypes.Schema, bytes []byte, path *gpb.Path, goStruct ygot.GoStruct, opt ...ytypes.UnmarshalOpt) error {
defer func() {
if r := recover(); r != nil {
logrus.Error(r.(error))
logrus.Error(r.(error)) //nolint:errcheck
}
}()
......
......@@ -65,7 +65,7 @@ func unmarshal(
opt ...ytypes.UnmarshalOpt) error {
defer func() {
if r := recover(); r != nil {
log.Error(r.(error))
log.Error(r.(error)) //nolint:errcheck
}
}()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment