From 997759994a55cc943804d6a16f29a4703f8435a3 Mon Sep 17 00:00:00 2001
From: Alexander Chuprov <a.chuprov@yadro.com>
Date: Thu, 13 Mar 2025 12:01:57 +0300
Subject: [PATCH] [#1676] golangci: Enable gci linter

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
---
 .golangci.yml                                         | 6 ++++++
 cmd/frostfs-adm/internal/modules/storagecfg/root.go   | 1 -
 cmd/frostfs-cli/modules/control/locate.go             | 1 -
 pkg/services/control/server/list_shards_for_object.go | 1 -
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/.golangci.yml b/.golangci.yml
index d83f36de8..f21a46248 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -22,6 +22,11 @@ linters-settings:
     # 'default' case is present, even if all enum members aren't listed in the
     # switch
     default-signifies-exhaustive: true
+  gci:
+    sections:
+      - standard
+      - default
+    custom-order: true
   govet:
     # report about shadowed variables
     check-shadowing: false
@@ -72,6 +77,7 @@ linters:
     - durationcheck
     - exhaustive
     - copyloopvar
+    - gci
     - gofmt
     - goimports
     - misspell
diff --git a/cmd/frostfs-adm/internal/modules/storagecfg/root.go b/cmd/frostfs-adm/internal/modules/storagecfg/root.go
index 8acbc4579..a5adea0da 100644
--- a/cmd/frostfs-adm/internal/modules/storagecfg/root.go
+++ b/cmd/frostfs-adm/internal/modules/storagecfg/root.go
@@ -31,7 +31,6 @@ import (
 	"github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger"
 	"github.com/nspcc-dev/neo-go/pkg/util"
 	"github.com/nspcc-dev/neo-go/pkg/wallet"
-
 	"github.com/spf13/cobra"
 )
 
diff --git a/cmd/frostfs-cli/modules/control/locate.go b/cmd/frostfs-cli/modules/control/locate.go
index d10e2a896..4cb4be539 100644
--- a/cmd/frostfs-cli/modules/control/locate.go
+++ b/cmd/frostfs-cli/modules/control/locate.go
@@ -11,7 +11,6 @@ import (
 	rawclient "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/rpc/client"
 	cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
 	oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
-
 	"github.com/mr-tron/base58"
 	"github.com/spf13/cobra"
 )
diff --git a/pkg/services/control/server/list_shards_for_object.go b/pkg/services/control/server/list_shards_for_object.go
index 84469772f..39565ed50 100644
--- a/pkg/services/control/server/list_shards_for_object.go
+++ b/pkg/services/control/server/list_shards_for_object.go
@@ -7,7 +7,6 @@ import (
 	"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
 	"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control"
 	"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control/server/ctrlmessage"
-
 	cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
 	oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
 	"google.golang.org/grpc/codes"