From 94ecc24b52ff2d50587e8c426907f9b02853aef7 Mon Sep 17 00:00:00 2001 From: networkop Date: Sun, 13 Jun 2021 15:32:15 +0100 Subject: [PATCH 1/2] Added basic makefile --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..e1899f7c3 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +BIN_DIR = $(shell pwd)/bin +BINARY = $(shell pwd)/bin/containerlab + +all: build + +build: + mkdir -p $(BIN_DIR) + go build -o $(BINARY) main.go + +test: + go test -race ./... -v + +lint: + golangci-lint run + From 6a4ade85d6df6504eacf9095c5eb23472ccc9bb9 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Sun, 13 Jun 2021 19:58:08 +0200 Subject: [PATCH 2/2] added container based lint target --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index e1899f7c3..15f2ae229 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,5 @@ test: lint: golangci-lint run +clint: + docker run -it --rm -v $$(pwd):/app -w /app golangci/golangci-lint:v1.40.1 golangci-lint run -v