From ac054b25a0cdd58b156fd6c330e83e805f5c4d67 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Jun 2025 15:15:18 -0400 Subject: [PATCH 1/2] feat(ci): Add check to ensure `go fmt` has been ran --- .github/workflows/test.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b603512d..f2f8cb8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,8 +8,25 @@ on: permissions: contents: read - + jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v5 + - name: Check out code + uses: actions/checkout@v4 + - name: Check formatting + run: | + unformatted=$(gofmt -l .) + if [ -n "$unformatted" ]; then + echo "The following files are not properly formatted:" + echo "$unformatted" + exit 1 + fi + echo "All Go files are properly formatted" + test: runs-on: ubuntu-latest strategy: From cef5aeb7dd07ec97fe99de7d56b7f0f528188ac7 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 25 Jun 2025 15:17:54 -0400 Subject: [PATCH 2/2] chore: `go fmt ./...` --- mcp/client_list_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp/client_list_test.go b/mcp/client_list_test.go index 6153ca54..7e6da95a 100644 --- a/mcp/client_list_test.go +++ b/mcp/client_list_test.go @@ -11,8 +11,8 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/modelcontextprotocol/go-sdk/mcp" "github.com/modelcontextprotocol/go-sdk/jsonschema" + "github.com/modelcontextprotocol/go-sdk/mcp" ) func TestList(t *testing.T) {