Added lint

This commit is contained in:
kolaente 2019-09-04 23:31:23 +02:00
parent 99b486c73f
commit 2aca6e87dc
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 9 additions and 1 deletions

View File

@ -16,6 +16,7 @@ steps:
image: vikunja/golang-build:latest
pull: true
commands:
- make lint
- make build
when:
event: [ push, tag, pull_request ]

View File

@ -122,4 +122,11 @@ release-copy:
.PHONY: release-check
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
.PHONY: lint
lint:
@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go install $(GOFLAGS) golang.org/x/lint/golint; \
fi
for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;