add linter

This commit is contained in:
skeris 2024-08-23 16:12:20 +03:00
parent 2a3cf5f10b
commit e3f0e1202c
3 changed files with 18 additions and 0 deletions

@ -3,10 +3,16 @@ include:
file: "/templates/docker/build-template.gitlab-ci.yml"
- project: "devops/pena-continuous-integration"
file: "/templates/docker/deploy-template.gitlab-ci.yml"
- project: "devops/pena-continuous-integration"
file: "/templates/docker/golint.gitlab-ci.yml"
stages:
- lint
- build
- deploy
lint:
extends: .golint_template
build-app:
extends: .build_template

10
Taskfile.dist.yml Normal file

@ -0,0 +1,10 @@
version: "3"
tasks:
update-linter:
cmds:
- go get -u penahub.gitlab.yandexcloud.net/devops/linters/golang.git
lint:
cmds:
- task: update-linter
- cmd: golangci-lint run -v -c $(go list -f '{{"{{"}}.Dir{{"}}"}}' -m penahub.gitlab.yandexcloud.net/devops/linters/golang.git)/.golangci.yml

@ -10,6 +10,8 @@ import (
"go.uber.org/zap"
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/app"
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/initialize"
// import for automatically updating linter rules
_ "penahub.gitlab.yandexcloud.net/devops/linters/golang.git/pkg/dummy"
)
var (