mirror of https://github.com/harness/drone.git
MISC: Fix go lint issues
parent
3c83ecb0df
commit
00cc64029a
|
@ -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")
|
||||
|
|
|
@ -33,6 +33,7 @@ import (
|
|||
var _ store.ConnectorStore = (*connectorStore)(nil)
|
||||
|
||||
const (
|
||||
//nolint:goconst
|
||||
connectorQueryBase = `
|
||||
SELECT` + connectorColumns + `
|
||||
FROM connectors`
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -72,6 +72,7 @@ const principalCommonColumns = `
|
|||
const principalColumns = principalCommonColumns + `
|
||||
,principal_type`
|
||||
|
||||
//nolint:goconst
|
||||
const principalSelectBase = `
|
||||
SELECT` + principalColumns + `
|
||||
FROM principals`
|
||||
|
|
|
@ -115,6 +115,7 @@ func createReferenceWalkPatternsFromQuery(basePath string, query string) []strin
|
|||
}
|
||||
|
||||
// suffix only match (refs/tags/**/*QUERY)
|
||||
//nolint:goconst
|
||||
return []string{basePath + "**/*" + query}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue