From 865532c2948345050184a139897b3e6253f11c11 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 2 Jul 2024 13:02:13 +0200 Subject: Makefile: Add a sloc target --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index cb5fb52..59e0556 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT_GOAL := build -.PHONY: build fmt cli clean coverage +.PHONY: build fmt lint cli test clean coverage sloc VERSION := $(shell grep -o 'const Version = "[^"]*' internal/version/version.go | cut -d '"' -f 2) @@ -27,3 +27,6 @@ clean: coverage: go test -v -coverpkg=./... -coverprofile=common.cov ./... go tool cover -func common.cov + +sloc: + tokei --exclude "*_test.go" -t=Go . || cloc --include-ext=go --not-match-f='_test.go' . -- cgit v1.2.3