mirror of
https://github.com/iv-org/invidious.git
synced 2026-01-28 15:58:30 -06:00
Use inline disable pragma
This commit is contained in:
parent
7d90748e78
commit
5f1c9849bf
@ -14,11 +14,6 @@ Lint/UselessAssign:
|
|||||||
- src/invidious/helpers/errors.cr
|
- src/invidious/helpers/errors.cr
|
||||||
- src/invidious/routes/**/*.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
|
# Ignore shadowed variable `key` (it works for now, and that's
|
||||||
# a sensitive part of the code)
|
# a sensitive part of the code)
|
||||||
Lint/ShadowingOuterLocalVar:
|
Lint/ShadowingOuterLocalVar:
|
||||||
|
|||||||
@ -32,6 +32,7 @@ module Invidious::Database
|
|||||||
def check_enum(enum_name, struct_type = nil)
|
def check_enum(enum_name, struct_type = nil)
|
||||||
return # TODO
|
return # TODO
|
||||||
|
|
||||||
|
# ameba:disable Lint/UnreachableCode
|
||||||
if !PG_DB.query_one?("SELECT true FROM pg_type WHERE typname = $1", enum_name, as: Bool)
|
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}")
|
LOGGER.info("check_enum: CREATE TYPE #{enum_name}")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user