2018-11-30 21:47:10 -08:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
|
|
# Ensure the repository is clean after code generation.
|
|
|
|
|
./script/generate
|
|
|
|
|
test -z "$(git status --porcelain)"
|
2018-12-05 00:49:12 -08:00
|
|
|
|
2019-07-30 18:40:47 -07:00
|
|
|
# Still clean after formatting.
|
|
|
|
|
./script/fmt
|
|
|
|
|
test -z "$(git status --porcelain)"
|
|
|
|
|
|
2019-01-10 21:31:04 -08:00
|
|
|
# And it's still clean after asmfmt.
|
|
|
|
|
# Note: we want to confirm we agree with asmfmt without actually depending on it.
|
|
|
|
|
find . -name '*.s' | xargs asmfmt -w
|
|
|
|
|
test -z "$(git status --porcelain)"
|
|
|
|
|
|
2018-12-05 00:49:12 -08:00
|
|
|
# Run suite of golangci-lint checks.
|
2019-01-13 10:12:52 -08:00
|
|
|
# (Provide examples directory explicitly since it is skipped by default.)
|
|
|
|
|
golangci-lint run ./... ./examples/...
|
2019-01-13 12:02:06 -08:00
|
|
|
|
|
|
|
|
# Check asm declarations.
|
2021-04-18 18:37:56 -07:00
|
|
|
go vet -vettool=$(which asmvet) ./...
|
2019-01-22 21:14:59 -08:00
|
|
|
|
|
|
|
|
# Custom linters.
|
|
|
|
|
./script/linter/pkgdoc
|