Skip to content
Snippets Groups Projects
Commit 4dc60057 authored by renovate_bot's avatar renovate_bot Committed by Matthias Feyll
Browse files

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


See merge request !883

Co-authored-by: default avatarFabian Seidl <fabian.seidl@h-da.de>
Co-authored-by: default avatarNeil Schark <neil.schark@h-da.de>
Co-authored-by: default avatarRenovate Bot <renovate@danet.fbi.h-da.de>
parent 320da28b
No related branches found
No related tags found
1 merge request!1005Draft: feature-ui-361_setup-project
code-quality: code-quality:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.58.1-alpine image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.59.0-alpine
stage: analyze stage: analyze
script: script:
# writes golangci-lint output to gl-code-quality-report.json # writes golangci-lint output to gl-code-quality-report.json
......
...@@ -18,7 +18,7 @@ PLUGIN_NAME= bundled_plugin.zip ...@@ -18,7 +18,7 @@ PLUGIN_NAME= bundled_plugin.zip
# Tool Versions # Tool Versions
GOTESTSUM_VERSION=v1.8.1 GOTESTSUM_VERSION=v1.8.1
GOLANGCI_LINT_VERSION=v1.57.2 GOLANGCI_LINT_VERSION=v1.59.0
MOCKERY_VERSION=v2.20.0 MOCKERY_VERSION=v2.20.0
YGOT_GENERATOR_VERSION=v0.27.0 YGOT_GENERATOR_VERSION=v0.27.0
YGOT_GENERATOR_GENERATOR_VERSION=v0.0.4 YGOT_GENERATOR_GENERATOR_VERSION=v0.0.4
......
package nucleus package nucleus
import ( import (
"code.fbi.h-da.de/danet/gosdn/controller/customerrs"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement"
"code.fbi.h-da.de/danet/gosdn/controller/store" "code.fbi.h-da.de/danet/gosdn/controller/store"
"github.com/google/uuid" "github.com/google/uuid"
...@@ -66,12 +67,12 @@ func (t *NetworkElementServiceMock) Get(query store.Query) (networkelement.Netwo ...@@ -66,12 +67,12 @@ func (t *NetworkElementServiceMock) Get(query store.Query) (networkelement.Netwo
// Second search for name // Second search for name
id, ok := t.nameLookupTable[query.Name] id, ok := t.nameLookupTable[query.Name]
if !ok { if !ok {
return nil, nil return nil, customerrs.CouldNotFindError{Name: query.Name}
} }
item, ok := t.Store[id] item, ok := t.Store[id]
if !ok { if !ok {
return nil, nil return nil, customerrs.CouldNotFindError{ID: id}
} }
return item, nil return item, nil
......
...@@ -62,5 +62,5 @@ func (t *PluginServiceMock) GetAll() ([]plugin.Plugin, error) { ...@@ -62,5 +62,5 @@ func (t *PluginServiceMock) GetAll() ([]plugin.Plugin, error) {
// RequestPlugin is a mock for requesting a plugin from the registry. // RequestPlugin is a mock for requesting a plugin from the registry.
// TODO: add plugin mock here. // TODO: add plugin mock here.
func (t *PluginServiceMock) RequestPlugin(uuid.UUID) (plugin.Plugin, error) { func (t *PluginServiceMock) RequestPlugin(uuid.UUID) (plugin.Plugin, error) {
return nil, nil return nil, nil //nolint:nilnil
} }
...@@ -128,29 +128,29 @@ func writeGoStruct(path string, code *gogen.GeneratedCode, t spb.Type) error { ...@@ -128,29 +128,29 @@ func writeGoStruct(path string, code *gogen.GeneratedCode, t spb.Type) error {
defer genutil.SyncFile(generatedCode) defer genutil.SyncFile(generatedCode)
// Write the package header to the supplier writer. // Write the package header to the supplier writer.
fmt.Fprint(generatedCode, code.CommonHeader) fmt.Fprint(generatedCode, code.CommonHeader) //nolint:errcheck
fmt.Fprint(generatedCode, code.OneOffHeader) fmt.Fprint(generatedCode, code.OneOffHeader) //nolint:errcheck
// Write the returned Go code out. First the Structs - which is the struct // Write the returned Go code out. First the Structs - which is the struct
// definitions for the generated YANG entity, followed by the enumerations. // definitions for the generated YANG entity, followed by the enumerations.
for _, snippet := range code.Structs { for _, snippet := range code.Structs {
fmt.Fprintln(generatedCode, snippet.String()) fmt.Fprintln(generatedCode, snippet.String()) //nolint:errcheck
} }
for _, snippet := range code.Enums { for _, snippet := range code.Enums {
fmt.Fprintln(generatedCode, snippet) fmt.Fprintln(generatedCode, snippet) //nolint:errcheck
} }
// Write the generated enumeration map out. // Write the generated enumeration map out.
fmt.Fprintln(generatedCode, code.EnumMap) fmt.Fprintln(generatedCode, code.EnumMap) //nolint:errcheck
// Write the schema out if it was received. // Write the schema out if it was received.
if len(code.JSONSchemaCode) > 0 { if len(code.JSONSchemaCode) > 0 {
fmt.Fprintln(generatedCode, code.JSONSchemaCode) fmt.Fprintln(generatedCode, code.JSONSchemaCode) //nolint:errcheck
} }
if len(code.EnumTypeMap) > 0 { if len(code.EnumTypeMap) > 0 {
fmt.Fprintln(generatedCode, code.EnumTypeMap) fmt.Fprintln(generatedCode, code.EnumTypeMap) //nolint:errcheck
} }
if err := writeManifest(path, &Manifest{ if err := writeManifest(path, &Manifest{
...@@ -179,29 +179,29 @@ func writeCode(path string, code *gogen.GeneratedCode, t spb.Type) error { ...@@ -179,29 +179,29 @@ func writeCode(path string, code *gogen.GeneratedCode, t spb.Type) error {
generatedCode := genutil.OpenFile(file) generatedCode := genutil.OpenFile(file)
defer genutil.SyncFile(generatedCode) defer genutil.SyncFile(generatedCode)
// Write the package header to the supplier writer. // Write the package header to the supplier writer.
fmt.Fprint(generatedCode, code.CommonHeader) fmt.Fprint(generatedCode, code.CommonHeader) //nolint:errcheck
fmt.Fprint(generatedCode, code.OneOffHeader) fmt.Fprint(generatedCode, code.OneOffHeader) //nolint:errcheck
// Write the returned Go code out. First the Structs - which is the struct // Write the returned Go code out. First the Structs - which is the struct
// definitions for the generated YANG entity, followed by the enumerations. // definitions for the generated YANG entity, followed by the enumerations.
for _, snippet := range code.Structs { for _, snippet := range code.Structs {
fmt.Fprintln(generatedCode, snippet) fmt.Fprintln(generatedCode, snippet) //nolint:errcheck
} }
for _, snippet := range code.Enums { for _, snippet := range code.Enums {
fmt.Fprintln(generatedCode, snippet) fmt.Fprintln(generatedCode, snippet) //nolint:errcheck
} }
// Write the generated enumeration map out. // Write the generated enumeration map out.
fmt.Fprintln(generatedCode, code.EnumMap) fmt.Fprintln(generatedCode, code.EnumMap) //nolint:errcheck
// Write the schema out if it was received. // Write the schema out if it was received.
if len(code.JSONSchemaCode) > 0 { if len(code.JSONSchemaCode) > 0 {
fmt.Fprintln(generatedCode, code.JSONSchemaCode) fmt.Fprintln(generatedCode, code.JSONSchemaCode) //nolint:errcheck
} }
if len(code.EnumTypeMap) > 0 { if len(code.EnumTypeMap) > 0 {
fmt.Fprintln(generatedCode, code.EnumTypeMap) fmt.Fprintln(generatedCode, code.EnumTypeMap) //nolint:errcheck
} }
if err := writeManifest(path, &Manifest{ if err := writeManifest(path, &Manifest{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment