Commit 7d8c1f55 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Add assert detector

parent fdf60f09
......@@ -112,7 +112,7 @@ testdata/scratch:
mkdir -p testdata/scratch
.PHONY: verify
verify: lint vet detect-context check-formatting staticcheck
verify: lint vet detect-context detect-assert check-formatting staticcheck
.PHONY: lint
lint: $(TARGET_SETUP)
......@@ -130,6 +130,11 @@ detect-context: $(TARGET_SETUP)
$(call message,Verify: $@)
_support/detect-context.sh
.PHONY: detect-assert
detect-assert:
$(call message,Verify: $@)
_support/detect-assert.sh
.PHONY: check-formatting
check-formatting: $(TARGET_SETUP) install-goimports
$(call message,Verify: $@)
......
#!/bin/sh
git grep 'testify/assert"' | \
grep -e '^[^:]*\.go' | \
awk '{
print "error: please use testify/require instead of testify/assert"
print
exit 1
}'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment