Skip to content

Commit 057f525

Browse files
feat(ci): Add check to ensure go fmt has been ran (#43)
1 parent 09181c2 commit 057f525

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,25 @@ on:
88

99
permissions:
1010
contents: read
11-
11+
1212
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
- name: Check out code
19+
uses: actions/checkout@v4
20+
- name: Check formatting
21+
run: |
22+
unformatted=$(gofmt -l .)
23+
if [ -n "$unformatted" ]; then
24+
echo "The following files are not properly formatted:"
25+
echo "$unformatted"
26+
exit 1
27+
fi
28+
echo "All Go files are properly formatted"
29+
1330
test:
1431
runs-on: ubuntu-latest
1532
strategy:

mcp/client_list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
"github.com/google/go-cmp/cmp"
1313
"github.com/google/go-cmp/cmp/cmpopts"
14-
"github.com/modelcontextprotocol/go-sdk/mcp"
1514
"github.com/modelcontextprotocol/go-sdk/jsonschema"
15+
"github.com/modelcontextprotocol/go-sdk/mcp"
1616
)
1717

1818
func TestList(t *testing.T) {

0 commit comments

Comments
 (0)