From 5aa1553a383e24b3c6076874ed74b6f403590b48 Mon Sep 17 00:00:00 2001 From: adlerhurst <27845747+adlerhurst@users.noreply.github.com> Date: Fri, 25 Jul 2025 20:16:08 +0200 Subject: [PATCH] linting --- backend/v3/storage/database/dialect/postgres/conn.go | 2 +- backend/v3/storage/database/dialect/postgres/pool.go | 1 - backend/v3/storage/database/dialect/postgres/tx.go | 1 - backend/v3/storage/database/dialect/sql/conn.go | 2 +- backend/v3/storage/database/dialect/sql/pool.go | 2 +- backend/v3/storage/database/dialect/sql/tx.go | 2 +- 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/v3/storage/database/dialect/postgres/conn.go b/backend/v3/storage/database/dialect/postgres/conn.go index fd6dfbf193..e5b599761b 100644 --- a/backend/v3/storage/database/dialect/postgres/conn.go +++ b/backend/v3/storage/database/dialect/postgres/conn.go @@ -33,7 +33,7 @@ func (c *pgxConn) Begin(ctx context.Context, opts *database.TransactionOptions) // Query implements sql.Client. // Subtle: this method shadows the method (*Conn).Query of pgxConn.Conn. func (c *pgxConn) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) { - //nolint:sqlclosecheck // Rows.Close is called by the caller + rows, err := c.Conn.Query(ctx, sql, args...) if err != nil { return nil, wrapError(err) diff --git a/backend/v3/storage/database/dialect/postgres/pool.go b/backend/v3/storage/database/dialect/postgres/pool.go index cfbd59d8ff..bf4ca44c31 100644 --- a/backend/v3/storage/database/dialect/postgres/pool.go +++ b/backend/v3/storage/database/dialect/postgres/pool.go @@ -33,7 +33,6 @@ func (c *pgxPool) Acquire(ctx context.Context) (database.Client, error) { // Query implements [database.Pool]. // Subtle: this method shadows the method (Pool).Query of pgxPool.Pool. func (c *pgxPool) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) { - //nolint:sqlclosecheck // Rows.Close is called by the caller rows, err := c.Pool.Query(ctx, sql, args...) if err != nil { return nil, wrapError(err) diff --git a/backend/v3/storage/database/dialect/postgres/tx.go b/backend/v3/storage/database/dialect/postgres/tx.go index db926e965b..6a330c16b9 100644 --- a/backend/v3/storage/database/dialect/postgres/tx.go +++ b/backend/v3/storage/database/dialect/postgres/tx.go @@ -40,7 +40,6 @@ func (tx *pgxTx) End(ctx context.Context, err error) error { // Query implements [database.Transaction]. // Subtle: this method shadows the method (Tx).Query of pgxTx.Tx. func (tx *pgxTx) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) { - //nolint:sqlclosecheck // Rows.Close is called by the caller rows, err := tx.Tx.Query(ctx, sql, args...) if err != nil { return nil, wrapError(err) diff --git a/backend/v3/storage/database/dialect/sql/conn.go b/backend/v3/storage/database/dialect/sql/conn.go index 9a7d6d1ddd..40749f690b 100644 --- a/backend/v3/storage/database/dialect/sql/conn.go +++ b/backend/v3/storage/database/dialect/sql/conn.go @@ -30,7 +30,7 @@ func (c *sqlConn) Begin(ctx context.Context, opts *database.TransactionOptions) // Query implements sql.Client. // Subtle: this method shadows the method (*Conn).Query of pgxConn.Conn. func (c *sqlConn) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) { - //nolint:sqlclosecheck // Rows.Close is called by the caller + //nolint:rowserrcheck // Rows.Close is called by the caller rows, err := c.QueryContext(ctx, sql, args...) if err != nil { return nil, wrapError(err) diff --git a/backend/v3/storage/database/dialect/sql/pool.go b/backend/v3/storage/database/dialect/sql/pool.go index a4c31be190..1bab0dd397 100644 --- a/backend/v3/storage/database/dialect/sql/pool.go +++ b/backend/v3/storage/database/dialect/sql/pool.go @@ -31,7 +31,7 @@ func (c *sqlPool) Acquire(ctx context.Context) (database.Client, error) { // Query implements [database.Pool]. // Subtle: this method shadows the method (Pool).Query of pgxPool.Pool. func (c *sqlPool) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) { - //nolint:sqlclosecheck // Rows.Close is called by the caller + //nolint:rowserrcheck // Rows.Close is called by the caller rows, err := c.QueryContext(ctx, sql, args...) if err != nil { return nil, wrapError(err) diff --git a/backend/v3/storage/database/dialect/sql/tx.go b/backend/v3/storage/database/dialect/sql/tx.go index 9a3fbcd403..46b7cf5ad9 100644 --- a/backend/v3/storage/database/dialect/sql/tx.go +++ b/backend/v3/storage/database/dialect/sql/tx.go @@ -43,7 +43,7 @@ func (tx *sqlTx) End(ctx context.Context, err error) error { // Query implements [database.Transaction]. // Subtle: this method shadows the method (Tx).Query of pgxTx.Tx. func (tx *sqlTx) Query(ctx context.Context, sql string, args ...any) (database.Rows, error) { - //nolint:sqlclosecheck // Rows.Close is called by the caller + //nolint:rowserrcheck // Rows.Close is called by the caller rows, err := tx.QueryContext(ctx, sql, args...) if err != nil { return nil, wrapError(err)