Skip to content

Commit

Permalink
Merge pull request karmada-io#2094 from wuyingjun-lucky/gci
Browse files Browse the repository at this point in the history
Add gci to seperate goimports to three parts
  • Loading branch information
karmada-bot authored Jul 4, 2022
2 parents 3bde193 + d6b4fac commit 417dc98
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ linters:
- unused
- varcheck
# other linters supported by golangci-lint.
- gci
- gocyclo
- gosec
- misspell
Expand All @@ -54,6 +55,11 @@ linters-settings:
gocyclo:
# minimal cyclomatic complexity to report
min-complexity: 15
gci:
sections:
- Standard
- Default
- Prefix(github.com/karmada-io/karmada)

issues:
# The list of ids of default excludes to include or disable. By default it's empty.
Expand All @@ -63,3 +69,12 @@ issues:
- EXC0012
- EXC0013
- EXC0014
exclude-rules:
# Exclude 'cmd/agent/main.go' and 'cmd/controller-manager/controller-manager.go'
# because 'sigs.k8s.io/controller-runtime/pkg/metrics' package should be set before 'k8s.io/apiserver/pkg/server' .
- path: cmd/agent/main.go
linters:
- gci
- path: cmd/controller-manager/controller-manager.go
linters:
- gci
4 changes: 2 additions & 2 deletions pkg/karmadactl/cmdinit/kubernetes/rbac.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package kubernetes

import (
"github.com/karmada-io/karmada/pkg/karmadactl/cmdinit/utils"

rbacv1 "k8s.io/api/rbac/v1"

"github.com/karmada-io/karmada/pkg/karmadactl/cmdinit/utils"
)

// CreateControllerManagerRBAC karmada-controller-manager ClusterRole and ClusterRoleBinding
Expand Down

0 comments on commit 417dc98

Please sign in to comment.