Makefile 580 B

12345678910111213141516171819202122232425262728293031
  1. # libseccomp-golang
  2. .PHONY: all check check-build check-syntax fix-syntax vet test lint
  3. all: check-build
  4. check: lint test
  5. check-build:
  6. go build
  7. check-syntax:
  8. gofmt -d .
  9. fix-syntax:
  10. gofmt -w .
  11. vet:
  12. go vet -v ./...
  13. # Previous bugs have made the tests freeze until the timeout. Golang default
  14. # timeout for tests is 10 minutes, which is too long, considering current tests
  15. # can be executed in less than 1 second. Reduce the timeout, so problems can
  16. # be noticed earlier in the CI.
  17. TEST_TIMEOUT=10s
  18. test:
  19. go test -v -timeout $(TEST_TIMEOUT)
  20. lint:
  21. golangci-lint run .