-
Couldn't load subscription status.
- Fork 10
feat(test reports): test_report key functionality #634
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
base: main
Are you sure you want to change the base?
Conversation
…nsitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
| "sync" | ||
| "time" | ||
|
|
||
| "github.com/go-vela/server/storage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
File is not properly formatted (gci)
| "context" | ||
| "time" | ||
|
|
||
| "github.com/go-vela/server/storage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
File is not properly formatted (gci)
| "net/url" | ||
|
|
||
| "github.com/gin-gonic/gin" | ||
| "github.com/go-vela/server/storage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
File is not properly formatted (gci)
| // | ||
| //nolint:nilerr,funlen // ignore returning nil - don't want to crash worker | ||
| //nolint:funlen // ignore returning nil - don't want to crash worker | ||
| func (w *Worker) exec(index int, config *api.Worker) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
cyclomatic complexity 35 of func (*Worker).exec is high (> 30) (gocyclo)
|
|
||
| // CreateTestAttachment creates a test attachment record in the database | ||
| // after a file has been successfully uploaded to storage. | ||
| func (c *client) CreateTestAttachment(fileName, filePath string, size int64, tr *api.TestReport) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
unused-parameter: parameter 'filePath' seems to be unused, consider removing or renaming it as _ (revive)
| Secure: false, | ||
| } | ||
| _sF, err := storage.New(_storageF) | ||
| if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
only one cuddle assignment allowed before if statement (wsl)
| if err != nil { | ||
| logger.Errorf("unable to create test attachment record for %s: %v", fileName, err) | ||
| // don't return error here to avoid blocking the upload process | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
block should not end with a whitespace (or comment) (wsl)
| // Conditionally add storage option | ||
| if s.Storage != nil { | ||
| fmt.Printf("Adding storage to linux executor\n") | ||
| opts = append(opts, linux.WithStorage(s.Storage)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
append only allowed to cuddle with appended value (wsl)
| if &storage == nil { | ||
| return true, nil | ||
| } | ||
| if !storage.StorageEnable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)
| if !storage.StorageEnable() { | ||
| return true, nil | ||
| } | ||
| return false, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
return statements should not be cuddled if block has more than two lines (wsl)
No description provided.