Skip to content

Commit

Permalink
use docker to run make format
Browse files Browse the repository at this point in the history
  • Loading branch information
keisku committed Mar 24, 2024
1 parent 1971ef4 commit 944131e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

all: format build

format: export GOFLAGS := -buildvcs=false
format:
go mod tidy
staticcheck ./...
find . -type f \( -name '*.[ch]' -and -not -name 'vmlinux.h' \) -exec clang-format -i {} \;
docker build -t gmonbuildenv -f Dockerfile.buildenv .
docker run --rm -v $(shell pwd):/src \
-e GOFLAGS="-buildvcs=false" \
gmonbuildenv \
bash \
-c "go mod tidy && go vet ./... && staticcheck ./... && find . -type f \( -name '*.[ch]' -and -not -name 'vmlinux.h' \) -exec clang-format -i {} \;"

build:
docker build -t gmonbuildenv -f Dockerfile.buildenv .
Expand Down

0 comments on commit 944131e

Please sign in to comment.