From f34ac651b729dd03f051717e6ee6b8c66f5765a5 Mon Sep 17 00:00:00 2001 From: antanst Date: Tue, 5 Nov 2024 12:40:30 +0200 Subject: [PATCH] Add Makefile and remove ad-hoc lint script --- Makefile | 19 +++++++++++++++++++ lint.sh | 3 --- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 Makefile delete mode 100755 lint.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..85017e3 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +SHELL := /usr/local/bin/oksh +export PATH := $(PATH) + +.PHONY: all fmt lint + +all: fmt lint test + +# Test +test: + go test -v ./... + +# Format code +fmt: + gofumpt -l -w . + gci write . + +# Run linter +lint: fmt + golangci-lint run diff --git a/lint.sh b/lint.sh deleted file mode 100755 index b3f1b7f..0000000 --- a/lint.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -set -eu -golangci-lint run