Added go vet, staticheck and lint to .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Piotr Biernat 2021-08-02 23:14:16 +02:00
parent 268cab5f79
commit e070fc402a
2 changed files with 30 additions and 4 deletions

View File

@ -3,7 +3,32 @@ type: docker
name: default
steps:
- name: test
image: golang
- name: static_check
image: golang:1.16
commands:
- ls -lah
- go get honnef.co/go/tools/cmd/staticcheck
- staticcheck ./pkg/...
volumes:
- name: gopath
path: /go
- name: lint
image: golang:1.16
commands:
- go get golang.org/x/lint/golint
- golint -set_exit_status ./pkg/...
volumes:
- name: gopath
path: /go
- name: vet
image: golang:1.16
commands:
- go vet ./pkg/...
volumes:
- name: gopath
path: /go
volumes:
- name: gopath
temp: {}

View File

@ -15,6 +15,7 @@ import (
"log"
"os"
"os/signal"
"syscall"
"time"
"vegvisir/pkg/cache"
"vegvisir/pkg/config"
@ -61,7 +62,7 @@ func (s *Server) Run() {
// Wait for an interrupt
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt, os.Kill)
signal.Notify(interrupt, os.Interrupt, syscall.SIGTERM)
<-interrupt
log.Println("SIGKILL or SIGINT caught, shutting down...")