From dbaf293c75db2d24308e715e34da566b914fed22 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Mon, 10 Nov 2025 10:22:33 -0500 Subject: [PATCH] add a go fmt test. --- .github/workflows/basictests.yml | 8 ++++++++ smat.go | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basictests.yml b/.github/workflows/basictests.yml index 90e058d7..72d2b093 100644 --- a/.github/workflows/basictests.yml +++ b/.github/workflows/basictests.yml @@ -17,6 +17,14 @@ jobs: go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v4 + - name: Check formatting + run: | + # Check formatting of all Go files in the project + if [ "$(gofmt -s -l $(find . -name "*.go" -type f) | wc -l)" -gt 0 ]; then + echo "The following files are not formatted with go fmt:" + gofmt -s -l $(find . -name "*.go" -type f) + exit 1 + fi - name: Test run: | go build -tags appengine diff --git a/smat.go b/smat.go index 7c41eb6e..9f91f2ca 100644 --- a/smat.go +++ b/smat.go @@ -78,8 +78,6 @@ type actionRecord struct { PairSnapshots []string // base64-encoded MarshalBinary of each pair's Bitmap } -var () - type smatPair struct { bm *Bitmap bs *bitset.BitSet