.PHONY: bootstrap setup test lint fmt fmt-check check build deps docker cibuild clean hooks

# Every target is a thin shim over script/. The scripts are the real
# entrypoints: they carry the project-specific knowledge (flags,
# timeouts, docker-only linting) that a raw `go test` or `golangci-lint`
# invocation silently bypasses. Never call the underlying tools
# directly.
.DEFAULT_GOAL := check

bootstrap:
	@script/bootstrap

setup:
	@script/setup

test:
	@script/test

lint:
	@script/lint

fmt:
	@script/fmt

fmt-check:
	@script/fmt-check

check:
	@script/check

# This repo is a library: there is no cmd/ and nothing to link, so
# `build` is the compile check over every package.
build:
	go build ./...

deps:
	go mod download
	go mod tidy

docker:
	@script/docker

cibuild:
	@script/cibuild

clean:
	go clean ./...

hooks:
	@script/install-precommit
