diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-05 08:50:33 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-05 08:50:33 +0200 |
| commit | 5d1b9f1062d38c301c0995ec6da980bdf5e48332 (patch) | |
| tree | 81e1a8963ea66cf06164e89beb6cd2da0ee325f7 /Makefile | |
| parent | bb46cfbccea301721fb93485ea7169f5841feda3 (diff) | |
Improve lint/vet reliability and refactor client runtime/bootstrap
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -38,18 +38,29 @@ clean: @echo "Removing .prof files..." find . -name "*.prof" -type f -delete vet: - find . -type d | grep -E -v '(./examples|./log|./doc)' | while read dir; do \ - echo ${GO} vet $$dir; \ - ${GO} vet $$dir; \ + @set -e; \ + packages=`${GO} list ./... | grep -v '^github.com/mimecast/dtail/benchmarks/cmd$$'`; \ + for pkg in $$packages; do \ + echo ${GO} vet $$pkg; \ + ${GO} vet $$pkg; \ done sh -c 'grep -R NEXT: .' sh -c 'grep -R TODO: .' lint: - ${GO} get golang.org/x/lint/golint - find . -type d | while read dir; do \ - echo golint $$dir; \ - golint $$dir; \ - done | grep -F .go: + @set -e; \ + ${GO} install golang.org/x/lint/golint@v0.0.0-20241112194109-818c5a804067; \ + gobin=`${GO} env GOBIN`; \ + if [ -z "$$gobin" ]; then \ + gobin=`${GO} env GOPATH`/bin; \ + fi; \ + golint_bin=$$gobin/golint; \ + packages=`${GO} list ./... | grep -v '^github.com/mimecast/dtail/benchmarks/cmd$$'`; \ + echo "Using $$golint_bin"; \ + output=`$$golint_bin $$packages || true`; \ + if [ -n "$$output" ]; then \ + echo "$$output"; \ + exit 1; \ + fi test: ${GO} clean -testcache set -e; find . -name '*_test.go' | while read file; do dirname $$file; done | \ |
