# Common development tasks. CI runs the same targets.
.PHONY: test fuzz fuzz-short vet fmt

test:
	go test -race -cover ./...

vet:
	go vet ./...

fmt:
	gofmt -w .

# Fuzz every target for FUZZTIME (CI: 5s per push, 2m nightly).
FUZZTIME ?= 15s
fuzz:
	for p in smbconf nfsconf exports; do for f in FuzzRoundTrip FuzzSetIsReadBack; do \
		go test ./internal/format/$$p -run '^$$' -fuzz $$f -fuzztime $(FUZZTIME) || exit 1; done; done

# Short run for local use.
fuzz-short:
	$(MAKE) fuzz FUZZTIME=15s
