Commit 67b4f267 authored by Zachary Seguin's avatar Zachary Seguin

Lint code before running build

parent 74857fb8
Pipeline #105 failed
image: golang:1.9
stages:
- check
- build
- test
......@@ -10,6 +11,14 @@ before_script:
- ln -sv ${CI_PROJECT_DIR} /go/src/git.zacharyseguin.ca/${CI_PROJECT_PATH}
- cd /go/src/git.zacharyseguin.ca/${CI_PROJECT_PATH}
go lint:
stage: check
before_script:
- go get gopkg.in/alecthomas/gometalinter.v1
- gometalinter.v1 --install
script:
- gometalinter.v1 --exclude=vendor --disable-all --enable=golint ./...
go build:
stage: build
script:
......@@ -25,4 +34,4 @@ go test:
script:
- godep restore
- godep go test -v -cover -race ./...
coverage: '/^coverage: (\d+\.\d+)% of statements/'
\ No newline at end of file
coverage: '/^coverage: (\d+\.\d+)% of statements/'gometalinter.v1 --exclude=vendor --disable-all --enable=golint ./...
......@@ -5,6 +5,7 @@ import (
"strings"
)
// SegmentType is the type of track segment.
type SegmentType int
const (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment