MISC: Fix go lint issues

pull/3418/head
Abhinav Singh 2023-10-20 15:30:32 -07:00
parent 3c83ecb0df
commit 00cc64029a
6 changed files with 6 additions and 2 deletions

View File

@ -135,6 +135,7 @@ func (s *CodeCommentView) UpdateAll(ctx context.Context, codeComments []*types.C
db := dbtx.GetAccessor(ctx, s.db)
//nolint:sqlclosecheck
stmt, err := db.PrepareNamedContext(ctx, sqlQuery)
if err != nil {
return database.ProcessSQLErrorf(err, "Failed to prepare update statement for update code comments")

View File

@ -33,6 +33,7 @@ import (
var _ store.ConnectorStore = (*connectorStore)(nil)
const (
//nolint:goconst
connectorQueryBase = `
SELECT` + connectorColumns + `
FROM connectors`

View File

@ -127,6 +127,7 @@ const (
// Find returns an execution given an execution ID.
func (s *executionStore) Find(ctx context.Context, id int64) (*types.Execution, error) {
//nolint:goconst
const findQueryStmt = `
SELECT` + executionColumns + `
FROM executions

View File

@ -72,6 +72,7 @@ const principalCommonColumns = `
const principalColumns = principalCommonColumns + `
,principal_type`
//nolint:goconst
const principalSelectBase = `
SELECT` + principalColumns + `
FROM principals`

View File

@ -115,6 +115,7 @@ func createReferenceWalkPatternsFromQuery(basePath string, query string) []strin
}
// suffix only match (refs/tags/**/*QUERY)
//nolint:goconst
return []string{basePath + "**/*" + query}
}

View File

@ -81,9 +81,8 @@ func (r *SharedRepo) Clone(ctx context.Context, branchName string) error {
}
} else if matched, _ = regexp.MatchString(".* repository .* does not exist.*", stderr); matched {
return fmt.Errorf("%s %w", r.repoUID, types.ErrNotFound)
} else {
return fmt.Errorf("Clone: %w %s", err, stderr)
}
return fmt.Errorf("Clone: %w %s", err, stderr)
}
gitRepo, err := git.OpenRepository(ctx, r.tmpPath)
if err != nil {