Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix part of lint/go errors (deadcode, ineffassign, depguard) #4624

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Contributor Author

@karamaru-alpha karamaru-alpha Oct 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to #2501, this package is just a copy of golang.org/x/perf/internal/stats.

Some lint errors were detected(deadcode, ineffassign), but I decided to ignore them because this package is not ours.


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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added: #2356
Unrefered: #2368

cronSchedule is currently used instead.

prefix = "command-output/"
)

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)
}

Comment on lines -187 to -190
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added: #2847
Unrefered: #3326

This is currently used instead.

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