portainer/portainer

View on GitHub
api/git/backup.go

Summary

Maintainability
A
35 mins
Test Coverage

Function CloneWithBackup has 5 return statements (exceeds 4 allowed).
Open

func CloneWithBackup(gitService portainer.GitService, fileService portainer.FileService, options CloneOptions) (clean func(), err error) {
    backupProjectPath := fmt.Sprintf("%s-old", options.ProjectPath)
    cleanUp := false
    cleanFn := func() {
        if !cleanUp {
Severity: Major
Found in api/git/backup.go - About 35 mins to fix

    There are no issues that match your filters.

    Category
    Status