Skip to content

Commit

Permalink
Fix part of lint/go errors (deadcode, ineffassign, depguard) (pipe-cd…
Browse files Browse the repository at this point in the history
…#4624)

* Ignore mannwhitney from golangci-lint

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>

* Fix lint/go errors (deadcode)

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>

* Fix lint/go errors (depguard)

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>

---------

Signed-off-by: karamaru-alpha <mrnk3078@gmail.com>
Signed-off-by: 鈴木 優耀 <suzuki_masaaki@cyberagent.co.jp>
  • Loading branch information
karamaru-alpha authored and 鈴木 優耀 committed Feb 12, 2024
1 parent 02eb45a commit d078918
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ run:
- ^.*\.(pb|y)\.go$
skip-dirs:
- "vendor$"
- "pkg/app/piped/executor/analysis/mannwhitney"

linters:
disable-all: true
Expand Down
1 change: 0 additions & 1 deletion pkg/app/ops/planpreviewoutputcleaner/cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
const (
outputTTL = 48 * time.Hour
cronSchedule = "0 9 * * *" // Run at 09:00 every day.
interval = 24 * time.Hour
prefix = "command-output/"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/livestatestore/cloudrun/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package cloudrun
import (
"context"
"fmt"
"sync/atomic"
"time"

"go.uber.org/atomic"
"go.uber.org/zap"

provider "github.com/pipe-cd/pipecd/pkg/app/piped/platformprovider/cloudrun"
Expand Down
4 changes: 0 additions & 4 deletions pkg/app/server/grpcapi/grpcapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ func gRPCStoreError(err error, msg string) error {
return status.Error(codes.Internal, fmt.Sprintf("Failed to %s", msg))
}

func makeUnregisteredAppsCacheKey(projectID string) string {
return fmt.Sprintf("HASHKEY:UNREGISTERED_APPS:%s", projectID)
}

func getPipedStatus(cs cache.Cache, id string) (model.Piped_ConnectionStatus, error) {
pipedStatus, err := cs.Get(id)
if errors.Is(err, cache.ErrNotFound) {
Expand Down

0 comments on commit d078918

Please sign in to comment.