From 83753f00304ce9f2f81907964fffc2437c4b5145 Mon Sep 17 00:00:00 2001 From: Christopher Tarry Date: Wed, 4 Sep 2024 20:27:19 -0400 Subject: [PATCH 1/2] fix minor jape warnings --- api/client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/client.go b/api/client.go index 09de6a25..72e62986 100644 --- a/api/client.go +++ b/api/client.go @@ -5,7 +5,6 @@ import ( "go.sia.tech/core/consensus" "go.sia.tech/core/types" - "go.sia.tech/coreutils/syncer" "go.sia.tech/explored/explorer" "go.sia.tech/jape" ) @@ -58,7 +57,7 @@ func (c *Client) SyncerConnect(addr string) (err error) { } // SyncerPeers returns the peers of the syncer. -func (c *Client) SyncerPeers() (resp []*syncer.Peer, err error) { +func (c *Client) SyncerPeers() (resp []string, err error) { err = c.c.GET("/syncer/peers", &resp) return } @@ -192,6 +191,6 @@ func (c *Client) BlockMetricsID(id types.BlockID) (resp explorer.Metrics, err er // Search returns what type of object an ID is. func (c *Client) Search(id types.Hash256) (resp explorer.SearchType, err error) { - err = c.c.GET(fmt.Sprintf("/search/%s", id), &resp) + err = c.c.GET(fmt.Sprintf("/search/%s", id.String()), &resp) return } From 583b1b8516ee8a9b163a62fae16f629cef573178 Mon Sep 17 00:00:00 2001 From: Christopher Tarry Date: Thu, 5 Sep 2024 12:19:46 -0400 Subject: [PATCH 2/2] add analyze workflow --- .github/workflows/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3e416e7..46796493 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,3 +11,15 @@ env: jobs: test: uses: SiaFoundation/workflows/.github/workflows/go-test.yml@master + analyze: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Jape Analyzer + uses: SiaFoundation/action-golang-analysis@HEAD + with: + analyzers: | + go.sia.tech/jape.Analyzer@master + directories: | + api