lint: enable custom linters from go-lint project
This commit is contained in:
@@ -39,9 +39,9 @@ func assertForeignKeysAreGood(t *testing.T, conn *sqlx.DB) {
|
||||
t.Helper()
|
||||
|
||||
// FKs should be enabled and intact at all times
|
||||
var fkEnabled bool
|
||||
require.NoError(t, conn.Get(&fkEnabled, `pragma foreign_keys`))
|
||||
assert.True(t, fkEnabled)
|
||||
var isFkEnabled bool
|
||||
require.NoError(t, conn.Get(&isFkEnabled, `pragma foreign_keys`))
|
||||
assert.True(t, isFkEnabled)
|
||||
assert.NoError(t, db.PragmaForeignKeyCheck(conn))
|
||||
|
||||
// ...and enforcement should be in effect again, not merely reported as on
|
||||
|
||||
@@ -16,8 +16,8 @@ func Get[T any](val T, err error) T {
|
||||
return val
|
||||
}
|
||||
|
||||
func Be(condition bool, msg string, args ...any) {
|
||||
if !condition {
|
||||
func Be(ok bool, msg string, args ...any) {
|
||||
if !ok {
|
||||
panic(fmt.Errorf(msg, args...)) //nolint:err113 // not a returned error
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user