Use inline disable pragma

This commit is contained in:
Sijawusz Pur Rahnama 2026-01-11 23:14:50 +01:00
parent 7d90748e78
commit 5f1c9849bf
2 changed files with 1 additions and 5 deletions

View File

@ -14,11 +14,6 @@ Lint/UselessAssign:
- src/invidious/helpers/errors.cr
- src/invidious/routes/**/*.cr
# Ignore false negative (if !db.query_one?...)
Lint/UnreachableCode:
Excluded:
- src/invidious/database/base.cr
# Ignore shadowed variable `key` (it works for now, and that's
# a sensitive part of the code)
Lint/ShadowingOuterLocalVar:

View File

@ -32,6 +32,7 @@ module Invidious::Database
def check_enum(enum_name, struct_type = nil)
return # TODO
# ameba:disable Lint/UnreachableCode
if !PG_DB.query_one?("SELECT true FROM pg_type WHERE typname = $1", enum_name, as: Bool)
LOGGER.info("check_enum: CREATE TYPE #{enum_name}")