diff --git a/.golangci.yml b/.golangci.yml index dbcf531..2d5de96 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,3 +34,7 @@ issues: exclude-use-default: true exclude-files: - ".*\\.mock\\.go$" + exclude-rules: + - path: 'gitexec/(.+)\.go' + linters: + - gocyclo diff --git a/cmd/git-run.go b/cmd/git-run.go index 22aacee..f119a36 100644 --- a/cmd/git-run.go +++ b/cmd/git-run.go @@ -45,6 +45,7 @@ func gitRunUpdate(ctx context.Context, repoPath string) error { case errors.Is(err, ErrGitRepositoryProtected): return nil default: + //nolint:gocritic switch v := err.(type) { case *GitRepositoryMovedError: if err1 := gitMove(ctx, repoPath, v.OldURL, v.NewURL); err1 != nil { diff --git a/cmd/git.go b/cmd/git.go index 968248f..eb445d9 100644 --- a/cmd/git.go +++ b/cmd/git.go @@ -744,6 +744,7 @@ func gitReplaceDefaultBranch(ctx context.Context, repoPath string, from, to *plu return nil } +//nolint:gocyclo func gitCheckAndPull(ctx context.Context, repoPath string) error { if isRemoteUpToDate, err := gitIsRemoteUpToDate(ctx, repoPath); err != nil { return err