🚨 Add some tooling/ linting

This commit is contained in:
Dan Jones 2025-09-07 22:01:33 -05:00
commit dc577bcb9c
5 changed files with 120 additions and 7 deletions

39
Taskfile.yml Normal file
View file

@ -0,0 +1,39 @@
# https://taskfile.dev
version: '3'
vars:
GOBIN_ENV:
sh: go env GOBIN
GOPATH_ENV:
sh: go env GOPATH
BIN: '{{if .GOBIN_ENV}}{{.GOBIN_ENV}}{{else}}{{.GOPATH_ENV}}/bin{{end}}'
tasks:
default:
desc: fmt, lint, test
deps:
- fmt
- lint
- test
fmt:
desc: Format go files
sources:
- "*.go"
cmds:
- go fmt ./...
lint:
desc: Statically analyze code
sources:
- '*.go'
cmds:
- golangci-lint run
test:
desc: Run all tests
sources:
- '*.go'
cmds:
- go test -cover -race .