Skip to content
Snippets Groups Projects
Commit ad826ec8 authored by Lyuben Penkovski's avatar Lyuben Penkovski
Browse files

chore: fix linters configuration in ci/cd pipelines

parent f3fa75f3
No related branches found
No related tags found
1 merge request!18chore: Update .gitlab-ci.yml and Dockerfile for CI/CD improvements
Pipeline #71744 passed with stages
in 2 minutes and 21 seconds
......@@ -12,7 +12,7 @@ stages:
- build
- trigger-deploy
lint:
image: golangci/golangci-lint:v1.50.1
image: golangci/golangci-lint:latest
stage: test
tags:
- amd64-docker
......@@ -20,8 +20,8 @@ lint:
- golangci-lint --version
- golangci-lint run
before_script:
- ln -s /builds /go/src/gitlab.com
- cd /go/src/gitlab.com/${CI_PROJECT_PATH}
- ln -s /builds /go/src/code.vereign.com
- cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
unit tests:
image: golang:${GO_VERSION}
......@@ -38,8 +38,8 @@ govulncheck:
tags:
- amd64-docker
before_script:
- ln -s /builds /go/src/gitlab.com
- cd /go/src/gitlab.com/${CI_PROJECT_PATH}
- ln -s /builds /go/src/code.vereign.com
- cd /go/src/code.vereign.com/${CI_PROJECT_PATH}
script:
- go version
- go install golang.org/x/vuln/cmd/govulncheck@latest
......
run:
deadline: 5m
skip-dirs:
timeout: 5m
issues:
exclude-dirs:
- vendor/
- .*fakes/
- .*generated/
skip-files:
exclude-files:
- .*generated.go
linters:
disable-all: true
enable:
- megacheck
- govet
- errcheck
- goconst
......@@ -20,10 +21,8 @@ linters:
- gosec
- ineffassign
- nakedret
- staticcheck
- unconvert
- vet
- vetshadow
- misspell
- staticcheck
- unused
- gosimple
......@@ -255,6 +255,7 @@ func createLogger(logLevel string, opts ...zap.Option) (*zap.Logger, error) {
return config.Build(opts...)
}
// nolint:misspell
func errFormatter(ctx context.Context, e error) goahttp.Statuser {
return service.NewErrorResponse(ctx, e)
}
......
......@@ -9,6 +9,7 @@ import (
"gitlab.eclipse.org/eclipse/xfsc/tsa/golib/errors"
)
// nolint:misspell
func NewErrorResponse(ctx context.Context, err error) goahttp.Statuser {
if err == nil {
return nil
......
//nolint:revive
package task_test
import (
......
//nolint:revive
package tasklist_test
import (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment