image: golang:1.17-buster fmt: stage: lint script: - go fmt ./... - if [[ -n $(git status --porcelain) ]]; then echo "The code is not correctly formatted"; exit 1; fi build: stage: build script: - make build stages: - lint - build