CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 27s
CI / web (push) Successful in 36s
CI / go (push) Successful in 54s
CI / bird2 (push) Successful in 16s
CI / release (push) Successful in 3m46s
- Enhanced AGENTS.md to include post-editing commands for Go code, specifying the use of `gofmt -w`, `go vet ./...`, and `scripts/lint-go.ps1`. - Updated engineering rules in .cursor/rules/engineering.mdc to clarify the linting process and ensure consistency in Go code formatting. - Improved documentation for CI checks related to Go code style and linting.
21 lines
448 B
Bash
21 lines
448 B
Bash
#!/bin/sh
|
|
# Same gates as CI job go (subset before full test): gofmt, vet, golangci-lint.
|
|
set -euxo pipefail
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
cd "$ROOT"
|
|
|
|
UNFMT="$(gofmt -l .)"
|
|
if [ -n "$UNFMT" ]; then
|
|
echo "gofmt: unformatted files:" >&2
|
|
echo "$UNFMT" >&2
|
|
exit 1
|
|
fi
|
|
|
|
go vet ./...
|
|
|
|
if command -v golangci-lint >/dev/null 2>&1; then
|
|
golangci-lint run
|
|
else
|
|
echo "lint-go: golangci-lint not in PATH, skipping (CI will run it)" >&2
|
|
fi
|