forked from quic-go/quic-go
githooks: add check that go.mod in integrationtests/gomodvendor is tidy (#3750)
This commit is contained in:
@@ -13,6 +13,14 @@ for f in $(git diff --cached --name-only); do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
pushd ./integrationtests/gomodvendor > /dev/null
|
||||||
|
go mod tidy
|
||||||
|
if [[ -n $(git diff --name-only -- "go.mod" "go.sum") ]]; then
|
||||||
|
echo "go.mod / go.sum in integrationtests/gomodvendor not tidied"
|
||||||
|
errored=true
|
||||||
|
fi
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
# Check that all Go files are properly gofumpt-ed.
|
# Check that all Go files are properly gofumpt-ed.
|
||||||
output=$(gofumpt -d $(git diff --cached --name-only -- '*.go'))
|
output=$(gofumpt -d $(git diff --cached --name-only -- '*.go'))
|
||||||
if [ -n "$output" ]; then
|
if [ -n "$output" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user