mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Merge pull request #59 from achilleasa/place-linter-deps-in-build-folder
Prepend build folder to GOPATH before building/testing/linting
This commit is contained in:
commit
4aa2600b65
11
Makefile
11
Makefile
@ -10,7 +10,10 @@ iso_target := $(BUILD_DIR)/kernel-$(ARCH).iso
|
|||||||
# If your go is called something else set it on the commandline, like
|
# If your go is called something else set it on the commandline, like
|
||||||
# this: make run GO=go1.8
|
# this: make run GO=go1.8
|
||||||
GO ?= go
|
GO ?= go
|
||||||
GOPATH := $(GOPATH):$(shell pwd)
|
|
||||||
|
# Prepend build path to GOPATH so the compiled packages and linter dependencies
|
||||||
|
# end up inside the build folder
|
||||||
|
GOPATH := $(BUILD_ABS_DIR):$(shell pwd):$(GOPATH)
|
||||||
|
|
||||||
ifeq ($(OS), Linux)
|
ifeq ($(OS), Linux)
|
||||||
export SHELL := /bin/bash -o pipefail
|
export SHELL := /bin/bash -o pipefail
|
||||||
@ -163,7 +166,7 @@ clean:
|
|||||||
|
|
||||||
lint: lint-check-deps
|
lint: lint-check-deps
|
||||||
@echo "[gometalinter] linting sources"
|
@echo "[gometalinter] linting sources"
|
||||||
@gometalinter.v1 \
|
@GOPATH=$(GOPATH) PATH=$(BUILD_ABS_DIR)/bin:$(PATH) gometalinter.v1 \
|
||||||
--disable-all \
|
--disable-all \
|
||||||
--enable=deadcode \
|
--enable=deadcode \
|
||||||
--enable=errcheck \
|
--enable=errcheck \
|
||||||
@ -180,11 +183,11 @@ lint: lint-check-deps
|
|||||||
--exclude 'return value not checked' \
|
--exclude 'return value not checked' \
|
||||||
--exclude 'possible misuse of unsafe.Pointer' \
|
--exclude 'possible misuse of unsafe.Pointer' \
|
||||||
--exclude 'x \^ 0 always equals x' \
|
--exclude 'x \^ 0 always equals x' \
|
||||||
./...
|
src/...
|
||||||
|
|
||||||
lint-check-deps:
|
lint-check-deps:
|
||||||
@GOPATH=$(GOPATH) $(GO) get -u -t gopkg.in/alecthomas/gometalinter.v1
|
@GOPATH=$(GOPATH) $(GO) get -u -t gopkg.in/alecthomas/gometalinter.v1
|
||||||
@gometalinter.v1 --install >/dev/null
|
@GOPATH=$(GOPATH) PATH=$(BUILD_ABS_DIR)/bin:$(PATH) gometalinter.v1 --install >/dev/null
|
||||||
|
|
||||||
test:
|
test:
|
||||||
GOPATH=$(GOPATH) $(GO) test -cover gopheros/...
|
GOPATH=$(GOPATH) $(GO) test -cover gopheros/...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user