From 3a9c9c912587ccb27d5301363ed45737dbb8b85d Mon Sep 17 00:00:00 2001 From: Vlad <13818348+walldiss@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:25:13 +0200 Subject: [PATCH 1/2] add lint imports ci action --- .github/workflows/go-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index 2526d5d2ac..bbe7e10314 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -47,6 +47,24 @@ jobs: version: v1.59 skip-cache: true + lint-imports: + needs: [setup] + name: Sort Imports + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: ${{ inputs.go-version }} + + - name: install goimports-reviser + run: go install -v github.com/incu6us/goimports-reviser/v3@latest + + - name: lint imports + run: make lint-imports + go_mod_tidy_check: needs: [setup] name: Go Mod Tidy Check From 16173cb2b3a3d4beb93f43fd7495df85b43b5921 Mon Sep 17 00:00:00 2001 From: Vlad <13818348+walldiss@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:55:23 +0200 Subject: [PATCH 2/2] fix unsorted imports --- .github/workflows/go-ci.yml | 2 +- share/eds/blockstore.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index bbe7e10314..df59d0cb73 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -49,7 +49,7 @@ jobs: lint-imports: needs: [setup] - name: Sort Imports + name: Lint Imports runs-on: ubuntu-latest steps: diff --git a/share/eds/blockstore.go b/share/eds/blockstore.go index 0effd23084..793878d658 100644 --- a/share/eds/blockstore.go +++ b/share/eds/blockstore.go @@ -6,8 +6,6 @@ import ( "fmt" "os" - share_ipld "github.com/celestiaorg/celestia-node/share/ipld" - bstore "github.com/ipfs/boxo/blockstore" "github.com/ipfs/boxo/datastore/dshelp" blocks "github.com/ipfs/go-block-format" @@ -15,6 +13,8 @@ import ( "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" ipld "github.com/ipfs/go-ipld-format" + + share_ipld "github.com/celestiaorg/celestia-node/share/ipld" ) var enableFixedDataSize = os.Getenv("CELESTIA_CONST_DATA_SIZE") == "1"