Merge pull request #315 from sgotti/update_golangci_lint
ci: update golangci-lint to v1.44.2
This commit is contained in:
commit
e11315764b
|
@ -32,7 +32,7 @@ local task_build_go(version, arch) = {
|
|||
{ type: 'run', command: 'make' },
|
||||
{ type: 'save_cache', key: 'cache-sum-{{ md5sum "go.sum" }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
|
||||
{ type: 'save_cache', key: 'cache-date-{{ year }}-{{ month }}-{{ day }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
|
||||
{ type: 'run', name: 'install golangci-lint', command: 'curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6' },
|
||||
{ type: 'run', name: 'install golangci-lint', command: 'curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.44.2' },
|
||||
{ type: 'run', command: 'golangci-lint run --deadline 5m' },
|
||||
{ type: 'run', name: 'build docker/k8s drivers tests binary', command: 'CGO_ENABLED=0 go test -c ./internal/services/executor/driver -o ./bin/docker-tests' },
|
||||
{ type: 'run', name: 'build integration tests binary', command: 'go test -tags "sqlite_unlock_notify" -c ./tests -o ./bin/integration-tests' },
|
||||
|
|
|
@ -164,9 +164,7 @@ func (s *PosixStorage) List(prefix, startWith, delimiter string, doneCh <-chan s
|
|||
recursive := delimiter == ""
|
||||
|
||||
// remove leading slash from prefix
|
||||
if strings.HasPrefix(prefix, "/") {
|
||||
prefix = strings.TrimPrefix(prefix, "/")
|
||||
}
|
||||
prefix = strings.TrimPrefix(prefix, "/")
|
||||
|
||||
fprefix := filepath.Join(s.dataDir, prefix)
|
||||
root := filepath.Dir(fprefix)
|
||||
|
@ -175,9 +173,7 @@ func (s *PosixStorage) List(prefix, startWith, delimiter string, doneCh <-chan s
|
|||
}
|
||||
|
||||
// remove leading slash
|
||||
if strings.HasPrefix(startWith, "/") {
|
||||
startWith = strings.TrimPrefix(startWith, "/")
|
||||
}
|
||||
startWith = strings.TrimPrefix(startWith, "/")
|
||||
|
||||
go func(objectCh chan<- ObjectInfo) {
|
||||
defer close(objectCh)
|
||||
|
|
|
@ -338,9 +338,7 @@ func (s *PosixFlatStorage) List(prefix, startWith, delimiter string, doneCh <-ch
|
|||
recursive := delimiter == ""
|
||||
|
||||
// remove leading slash from prefix
|
||||
if strings.HasPrefix(prefix, "/") {
|
||||
prefix = strings.TrimPrefix(prefix, "/")
|
||||
}
|
||||
prefix = strings.TrimPrefix(prefix, "/")
|
||||
|
||||
fprefix := filepath.Join(s.dataDir, escape(prefix))
|
||||
root := filepath.Dir(fprefix)
|
||||
|
@ -349,9 +347,7 @@ func (s *PosixFlatStorage) List(prefix, startWith, delimiter string, doneCh <-ch
|
|||
}
|
||||
|
||||
// remove leading slash
|
||||
if strings.HasPrefix(startWith, "/") {
|
||||
startWith = strings.TrimPrefix(startWith, "/")
|
||||
}
|
||||
startWith = strings.TrimPrefix(startWith, "/")
|
||||
|
||||
go func(objectCh chan<- ObjectInfo) {
|
||||
var prevp string
|
||||
|
|
|
@ -129,12 +129,8 @@ func (s *S3Storage) List(prefix, startWith, delimiter string, doneCh <-chan stru
|
|||
}
|
||||
|
||||
// remove leading slash
|
||||
if strings.HasPrefix(prefix, "/") {
|
||||
prefix = strings.TrimPrefix(prefix, "/")
|
||||
}
|
||||
if strings.HasPrefix(startWith, "/") {
|
||||
startWith = strings.TrimPrefix(startWith, "/")
|
||||
}
|
||||
prefix = strings.TrimPrefix(prefix, "/")
|
||||
startWith = strings.TrimPrefix(startWith, "/")
|
||||
|
||||
// Initiate list objects goroutine here.
|
||||
go func(objectCh chan<- ObjectInfo) {
|
||||
|
|
|
@ -162,7 +162,7 @@ func (r *Run) TasksWaitingApproval() []string {
|
|||
// CanRestartFromScratch reports if the run can be restarted from scratch
|
||||
func (r *Run) CanRestartFromScratch() (bool, string) {
|
||||
if r.Phase == RunPhaseSetupError {
|
||||
return false, fmt.Sprintf("run has setup errors")
|
||||
return false, "run has setup errors"
|
||||
}
|
||||
// can restart only if the run phase is finished or cancelled
|
||||
if !r.Phase.IsFinished() {
|
||||
|
@ -174,7 +174,7 @@ func (r *Run) CanRestartFromScratch() (bool, string) {
|
|||
// CanRestartFromFailedTasks reports if the run can be restarted from failed tasks
|
||||
func (r *Run) CanRestartFromFailedTasks() (bool, string) {
|
||||
if r.Phase == RunPhaseSetupError {
|
||||
return false, fmt.Sprintf("run has setup errors")
|
||||
return false, "run has setup errors"
|
||||
}
|
||||
// can restart only if the run phase is finished or cancelled
|
||||
if !r.Phase.IsFinished() {
|
||||
|
|
Loading…
Reference in New Issue