mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Remove local replace directives for netrunner and genesis - Replace golangci-lint with staticcheck for Go 1.25 compatibility - Update lint.sh to use staticcheck
27 lines
509 B
Bash
Executable File
27 lines
509 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# Run go fmt
|
|
echo "Running go fmt..."
|
|
fmt_output=$(gofmt -l .)
|
|
if [ -n "$fmt_output" ]; then
|
|
echo "The following files need to be formatted:"
|
|
echo "$fmt_output"
|
|
exit 1
|
|
fi
|
|
|
|
# Run go vet
|
|
echo "Running go vet..."
|
|
go vet ./...
|
|
|
|
# Run staticcheck
|
|
echo "Running staticcheck..."
|
|
if command -v staticcheck &> /dev/null; then
|
|
staticcheck ./... || true
|
|
else
|
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
staticcheck ./... || true
|
|
fi
|
|
|
|
echo "All checks passed!" |