From 006ca9e6a5b54e159eec441c88d94dcf492179d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nemanja=20Zbilji=C4=87?= Date: Mon, 6 Jan 2025 18:20:00 +0100 Subject: [PATCH] style: update lint rules --- .golangci.yml | 4 ++++ cmd/git-run.go | 1 + cmd/git.go | 1 + 3 files changed, 6 insertions(+) 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