From 1bff92c52b27b9a516599e172fe9852c3d99be38 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 2 Apr 2024 11:27:13 +0200 Subject: chore: add linters and some lint fixes (#8) * chore: add linters and some lint fixes Configure some golangci-lint linters to get the code quality right. Apply the first fixes. Next step will be to add github actions to run lint and tests in github CI. * chore: more lint, fixed comments and variable names. no semantic change. * chore: add Makefile This makefile is intended to be used as a local substitute to github actions. --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a55652e --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +# Static linting of source files. See .golangci.yaml for options. +lint: + golangci-lint run + +# Run tests with race detector, measure coverage. +test: + go test -race -covermode=atomic -coverprofile=cover.out ./... + +# Open coverage info in browser +cover: test + go tool cover -html=cover.out -- cgit v1.2.3