Merge branch 'ci/add-go-vet-to-test-stage' into 'main'
ci: add go vet to test stage See merge request hectorjsmith/fail2ban-prometheus-exporter!99
This commit is contained in:
commit
18000cf9ef
@ -19,6 +19,13 @@ format:
|
||||
script:
|
||||
- make check/fmt
|
||||
|
||||
vet:
|
||||
extends: .go_template
|
||||
stage: test
|
||||
allow_failure: true
|
||||
script:
|
||||
- make vet
|
||||
|
||||
test:
|
||||
extends: .go_template
|
||||
stage: test
|
||||
|
5
Makefile
5
Makefile
@ -20,6 +20,11 @@ update:
|
||||
test: download
|
||||
go test ./... -v -race
|
||||
|
||||
# Look for "suspicious constructs" in source code
|
||||
.PHONY: vet
|
||||
vet: download
|
||||
go vet ./...
|
||||
|
||||
# Format code
|
||||
.PHONY: fmt
|
||||
fmt: download
|
||||
|
@ -53,7 +53,7 @@ func main() {
|
||||
}
|
||||
|
||||
func handleGracefulShutdown() {
|
||||
var signals = make(chan os.Signal)
|
||||
var signals = make(chan os.Signal, 1)
|
||||
|
||||
signal.Notify(signals, syscall.SIGTERM)
|
||||
signal.Notify(signals, syscall.SIGINT)
|
||||
|
Loading…
Reference in New Issue
Block a user