mod tidy #15150
reviewdog [golangci] report
reported by reviewdog 🐶
Findings (62)
api/types/test-report/test_case.go|32 col 10| string ...
has 3 occurrences, make it a constant (goconst)
compiler/native/expand.go|396 col 33| string golang
has 3 occurrences, make it a constant (goconst)
storage/minio/download.go|50 col 54| G115: integer overflow conversion int64 -> uint64 (gosec)
storage/minio/download.go|63 col 79| G115: integer overflow conversion int64 -> uint64 (gosec)
api/types/test-report/performance_results.go|1 col 9| var-naming: don't use an underscore in package name (revive)
api/types/test-report/test_run.go|1 col 9| var-naming: don't use an underscore in package name (revive)
api/types/test-report/test_run_system_attributes.go|1 col 9| var-naming: don't use an underscore in package name (revive)
storage/minio/minio.go|22 col 6| exported: type name will be used as minio.MinioClient by other packages, and that stutters; consider calling this Client (revive)
storage/context.go|61 col 9| context-keys-type: should not use basic type string as key in context.WithValue (revive)
storage/minio/minio.go|92 col 6| func pingBucket
is unused (unused)
storage/minio/stat_object.go|17 col 122| non-wrapping format verb for fmt.Errorf. Use %w
to format errors (errorlint)
api/admin/storage.go|6 col 1| File is not properly formatted (gci)
api/admin/storage.go|7 col 1| File is not properly formatted (gci)
api/admin/storage.go|11 col 1| File is not properly formatted (gci)
storage/context.go|10 col 1| Comment should end in a period (godot)
storage/context.go|18 col 1| Comment should end in a period (godot)
storage/context.go|59 col 1| Comment should end in a period (godot)
api/types/storage.go|1 col 1| Missed header for check (goheader)
api/types/test_report.go|1 col 1| Missed header for check (goheader)
compiler/types/pipeline/test_report.go|1 col 1| Missed header for check (goheader)
storage/minio/minio.go|37 col 2| ineffectual assignment to useSSL (ineffassign)
storage/minio/download.go|29 col 32| retrive
is a misspelling of retrieve
(misspell)
compiler/native/compile_test.go|2449 col 13| SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
compiler/native/compile_test.go|2450 col 13| SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
scm/github/app_permissions.go|62 col 20| SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
scm/github/deployment.go|180 col 21| SA1019: github.Bool is deprecated: use Ptr instead. (staticcheck)
scm/github/repo.go|209 col 11| SA1019: github.Bool is deprecated: use Ptr instead. (staticcheck)
scm/github/repo.go|283 col 11| SA1019: github.Bool is deprecated: use Ptr instead. (staticcheck)
scm/github/github_client_test.go|76 col 9| SA1019: github.Int64 is deprecated: use Ptr instead. (staticcheck)
scm/github/github_client_test.go|90 col 9| SA1019: github.Int64 is deprecated: use Ptr instead. (staticcheck)
scm/github/github_client_test.go|104 col 9| SA1019: github.Int64 is deprecated: use Ptr instead. (staticcheck)
storage/minio/create_bucket.go|13 col 5| SA4022: the address of a variable cannot be nil (staticcheck)
api/types/test-report/test_suite.go|19 col 2| ST1003: struct field StartTs should be StartTS (stylecheck)
api/types/test-report/test_suite.go|324 col 21| ST1003: method SetStartTs should be SetStartTS (stylecheck)
api/types/test-report/test_suite.go|337 col 21| ST1003: method GetStartTs should be GetStartTS (stylecheck)
compiler/types/pipeline/container.go|51 col 33| tag is not aligned, should be: json:"test_report,omitempty" yaml:"test_report,omitempty" (tagalign)
compiler/types/pipeline/test_report.go|16 col 24| tag is not aligned, should be: yaml:"results,omitempty" json:"results,omitempty" (tagalign)
compiler/types/yaml/buildkite/test_report.go|7 col 23| tag is not aligned, should be: yaml:"results,omitempty" json:"results,omitempty" (tagalign)
compiler/types/yaml/buildkite/test_report.go|24 col 24| tag is not aligned, should be: yaml:"results,omitempty" json:"results,omitempty" (tagalign)
storage/storage.go|28 col 1| unnecessary trailing newline (whitespace)
storage/storage.go|56 col 1| unnecessary trailing newline (whitespace)
storage/minio/download.go|95 col 1| unnecessary trailing newline (whitespace)
api/admin/storage.go|322 col 2| assignments should only be cuddled with other assignments (wsl)
api/admin/storage.go|388 col 3| return statements should not be cuddled if block has more than two lines (wsl)
api/admin/storage.go|385 col 2| if statements should only be cuddled with assignments (wsl)
api/admin/storage.go|399 col 3| return statements should not be cuddled if block has more than two lines (wsl)
api/admin/storage.go|67 col 2| only one cuddle assignment allowed before if statement (wsl)
api/admin/storage.go|250 col 3| return statements should not be cuddled if block has more than two lines (wsl)
api/admin/storage.go|317 col 2| if statements should only be cuddled with assignments (wsl)
api/admin/storage.go|390 col 2| if statements should only be cuddled with assignments (wsl)
api/admin/storage.go|323 col 2| only one cuddle assignment allowed before if statement (wsl)
api/admin/storage.go|395 col 2| assignments should only be cuddled with other assignments (wsl)
api/admin/storage.go|396 col 2| only one cuddle assignment allowed before if statement (wsl)
api/admin/storage.go|65 col 2| expressions should not be cuddled with blocks (wsl)
api/types/test-report/code_coverage_file.go|103 col 2| assignments should only be cuddled with other assignments (wsl)
storage/storage.go|43 col 2| expressions should not be cuddled with blocks (wsl)
storage/minio/create_bucket.go|12 col 2| declarations should never be cuddled (wsl)
storage/minio/list_objects.go|15 col 2| ranges should only be cuddled with assignments used in the iteration (wsl)
storage/minio/list_objects.go|19 col 3| append only allowed to cuddle with appended value (wsl)
storage/minio/minio.go|112 col 89| block should not start with a whitespace (wsl)
storage/minio/minio.go|89 col 1| block should not end with a whitespace (or comment) (wsl)
storage/minio/minio.go|111 col 1| directive //nolint:revive // ignore returning unexported client
is unused for linter "revive" (nolintlint)
Filtered Findings (0)
Annotations
Check failure on line 32 in api/types/test-report/test_case.go
github-actions / golangci
[golangci] api/types/test-report/test_case.go#L32
string `...` has 3 occurrences, make it a constant (goconst)
Raw output
api/types/test-report/test_case.go:32:10: string `...` has 3 occurrences, make it a constant (goconst)
return "..."
^
Check failure on line 396 in compiler/native/expand.go
github-actions / golangci
[golangci] compiler/native/expand.go#L396
string `golang` has 3 occurrences, make it a constant (goconst)
Raw output
compiler/native/expand.go:396:33: string `golang` has 3 occurrences, make it a constant (goconst)
case constants.PipelineTypeGo, "golang", "":
^
Check failure on line 50 in storage/minio/download.go
github-actions / golangci
[golangci] storage/minio/download.go#L50
G115: integer overflow conversion int64 -> uint64 (gosec)
Raw output
storage/minio/download.go:50:54: G115: integer overflow conversion int64 -> uint64 (gosec)
logrus.Infof("%s to download", humanize.Bytes(uint64(objInfo.Size)))
^
Check failure on line 63 in storage/minio/download.go
github-actions / golangci
[golangci] storage/minio/download.go#L63
G115: integer overflow conversion int64 -> uint64 (gosec)
Raw output
storage/minio/download.go:63:79: G115: integer overflow conversion int64 -> uint64 (gosec)
logrus.Infof("downloaded %s to %s on local filesystem", humanize.Bytes(uint64(stat.Size())), filename)
^
Check failure on line 1 in api/types/test-report/performance_results.go
github-actions / golangci
[golangci] api/types/test-report/performance_results.go#L1
var-naming: don't use an underscore in package name (revive)
Raw output
api/types/test-report/performance_results.go:1:9: var-naming: don't use an underscore in package name (revive)
package test_report
^
Check failure on line 1 in api/types/test-report/test_run.go
github-actions / golangci
[golangci] api/types/test-report/test_run.go#L1
var-naming: don't use an underscore in package name (revive)
Raw output
api/types/test-report/test_run.go:1:9: var-naming: don't use an underscore in package name (revive)
package test_report
^
Check failure on line 1 in api/types/test-report/test_run_system_attributes.go
github-actions / golangci
[golangci] api/types/test-report/test_run_system_attributes.go#L1
var-naming: don't use an underscore in package name (revive)
Raw output
api/types/test-report/test_run_system_attributes.go:1:9: var-naming: don't use an underscore in package name (revive)
package test_report
^
Check failure on line 22 in storage/minio/minio.go
github-actions / golangci
[golangci] storage/minio/minio.go#L22
exported: type name will be used as minio.MinioClient by other packages, and that stutters; consider calling this Client (revive)
Raw output
storage/minio/minio.go:22:6: exported: type name will be used as minio.MinioClient by other packages, and that stutters; consider calling this Client (revive)
type MinioClient struct {
^
Check failure on line 61 in storage/context.go
github-actions / golangci
[golangci] storage/context.go#L61
context-keys-type: should not use basic type string as key in context.WithValue (revive)
Raw output
storage/context.go:61:9: context-keys-type: should not use basic type string as key in context.WithValue (revive)
return context.WithValue(ctx, key, storage)
^
Check failure on line 92 in storage/minio/minio.go
github-actions / golangci
[golangci] storage/minio/minio.go#L92
func `pingBucket` is unused (unused)
Raw output
storage/minio/minio.go:92:6: func `pingBucket` is unused (unused)
func pingBucket(c *MinioClient, bucket string) error {
^
Check failure on line 17 in storage/minio/stat_object.go
github-actions / golangci
[golangci] storage/minio/stat_object.go#L17
non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
Raw output
storage/minio/stat_object.go:17:122: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors (errorlint)
return nil, fmt.Errorf("unable to get object info %s from bucket %s: %v", object.ObjectName, object.Bucket.BucketName, err)
^
Check failure on line 6 in api/admin/storage.go
github-actions / golangci
[golangci] api/admin/storage.go#L6
File is not properly formatted (gci)
Raw output
api/admin/storage.go:6:1: File is not properly formatted (gci)
"fmt"
^
Check failure on line 7 in api/admin/storage.go
github-actions / golangci
[golangci] api/admin/storage.go#L7
File is not properly formatted (gci)
Raw output
api/admin/storage.go:7:1: File is not properly formatted (gci)
"github.com/gin-gonic/gin"
^
Check failure on line 11 in api/admin/storage.go
github-actions / golangci
[golangci] api/admin/storage.go#L11
File is not properly formatted (gci)
Raw output
api/admin/storage.go:11:1: File is not properly formatted (gci)
"github.com/sirupsen/logrus"
^
Check failure on line 10 in storage/context.go
github-actions / golangci
[golangci] storage/context.go#L10
Comment should end in a period (godot)
Raw output
storage/context.go:10:1: Comment should end in a period (godot)
// key is the key used to store minio service in context
^
Check failure on line 18 in storage/context.go
github-actions / golangci
[golangci] storage/context.go#L18
Comment should end in a period (godot)
Raw output
storage/context.go:18:1: Comment should end in a period (godot)
// FromContext retrieves minio service from the context
^
Check failure on line 59 in storage/context.go
github-actions / golangci
[golangci] storage/context.go#L59
Comment should end in a period (godot)
Raw output
storage/context.go:59:1: Comment should end in a period (godot)
// WithContext adds the minio Storage to the context
^
Check failure on line 1 in api/types/storage.go
github-actions / golangci
[golangci] api/types/storage.go#L1
Missed header for check (goheader)
Raw output
api/types/storage.go:1:1: Missed header for check (goheader)
package types
^
Check failure on line 1 in api/types/test_report.go
github-actions / golangci
[golangci] api/types/test_report.go#L1
Missed header for check (goheader)
Raw output
api/types/test_report.go:1:1: Missed header for check (goheader)
package types
^
Check failure on line 1 in compiler/types/pipeline/test_report.go
github-actions / golangci
[golangci] compiler/types/pipeline/test_report.go#L1
Missed header for check (goheader)
Raw output
compiler/types/pipeline/test_report.go:1:1: Missed header for check (goheader)
package pipeline
^
Check failure on line 37 in storage/minio/minio.go
github-actions / golangci
[golangci] storage/minio/minio.go#L37
ineffectual assignment to useSSL (ineffassign)
Raw output
storage/minio/minio.go:37:2: ineffectual assignment to useSSL (ineffassign)
useSSL := true
^
Check failure on line 29 in storage/minio/download.go
github-actions / golangci
[golangci] storage/minio/download.go#L29
`retrive` is a misspelling of `retrieve` (misspell)
Raw output
storage/minio/download.go:29:32: `retrive` is a misspelling of `retrieve` (misspell)
// c.Logger.Errorf("unable to retrive object %s", object.ObjectName)
^
Check failure on line 2449 in compiler/native/compile_test.go
github-actions / golangci
[golangci] compiler/native/compile_test.go#L2449
SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
Raw output
compiler/native/compile_test.go:2449:13: SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
Encoding: github.String(""),
^
Check failure on line 2450 in compiler/native/compile_test.go
github-actions / golangci
[golangci] compiler/native/compile_test.go#L2450
SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
Raw output
compiler/native/compile_test.go:2450:13: SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
Content: github.String(string(body)),
^
Check failure on line 62 in scm/github/app_permissions.go
github-actions / golangci
[golangci] scm/github/app_permissions.go#L62
SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
Raw output
scm/github/app_permissions.go:62:20: SA1019: github.String is deprecated: use Ptr instead. (staticcheck)
perms.Contents = github.String(perm)
^