diff --git a/src/github.com/matrix-org/dendrite/cmd/syncserver-integration-tests/testdata.go b/src/github.com/matrix-org/dendrite/cmd/syncserver-integration-tests/testdata.go index 5316c587c..bde34ae79 100644 --- a/src/github.com/matrix-org/dendrite/cmd/syncserver-integration-tests/testdata.go +++ b/src/github.com/matrix-org/dendrite/cmd/syncserver-integration-tests/testdata.go @@ -14,7 +14,7 @@ package main -// nolint: varcheck, deadcode +// nolint: varcheck, deadcode, unused const ( i0StateRoomCreate = iota i1StateAliceJoin @@ -35,6 +35,15 @@ const ( i16StateAliceKickCharlie i17BobMsg i18StateAliceRoomName + i19BobMsg + i20StateBobLeave + i21AliceMsg + i22StateAliceInviteBob + i23StateBobRejectInvite + i24AliceMsg + i25StateAliceRoomName + i26StateCharlieJoin + i27CharlieMsg ) var outputRoomEventTestData = []string{ diff --git a/src/github.com/matrix-org/dendrite/common/partition_offset_table.go b/src/github.com/matrix-org/dendrite/common/partition_offset_table.go index 63aa61a57..9d727c56e 100644 --- a/src/github.com/matrix-org/dendrite/common/partition_offset_table.go +++ b/src/github.com/matrix-org/dendrite/common/partition_offset_table.go @@ -47,6 +47,7 @@ type PartitionOffsetStatements struct { // Prepare converts the raw SQL statements into prepared statements. // Takes a prefix to prepend to the table name used to store the partition offsets. // This allows multiple components to share the same database schema. +// nolint: safesql func (s *PartitionOffsetStatements) Prepare(db *sql.DB, prefix string) (err error) { _, err = db.Exec(strings.Replace(partitionOffsetsSchema, "${prefix}", prefix, -1)) if err != nil { diff --git a/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go b/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go index 5e1eb3e12..85d65c2cc 100644 --- a/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go +++ b/src/github.com/matrix-org/dendrite/publicroomsapi/storage/public_rooms_table.go @@ -134,6 +134,7 @@ type publicRoomsStatements struct { updateRoomAttributeStmts map[string]*sql.Stmt } +// nolint: safesql func (s *publicRoomsStatements) prepare(db *sql.DB) (err error) { _, err = db.Exec(publicRoomsSchema) if err != nil { diff --git a/src/github.com/matrix-org/dendrite/roomserver/storage/prepare.go b/src/github.com/matrix-org/dendrite/roomserver/storage/prepare.go index b19765992..61c49a3c1 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/storage/prepare.go +++ b/src/github.com/matrix-org/dendrite/roomserver/storage/prepare.go @@ -25,6 +25,7 @@ type statementList []struct { } // prepare the SQL for each statement in the list and assign the result to the prepared statement. +// nolint: safesql func (s statementList) prepare(db *sql.DB) (err error) { for _, statement := range s { if *statement.statement, err = db.Prepare(statement.sql); err != nil {