Files
avo/script/lint

25 lines
636 B
Plaintext
Raw Normal View History

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
# Still clean after formatting.
./script/fmt
test -z "$(git status --porcelain)"
# 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.
asmdecl ./...
# Custom linters.
./script/linter/pkgdoc