Fix Lint/ShadowingOuterLocalVar type of Ameba issues

This commit is contained in:
Sijawusz Pur Rahnama 2026-01-11 23:23:44 +01:00
parent ca41bbd21b
commit b6c58cbafc
2 changed files with 1 additions and 6 deletions

View file

@ -14,12 +14,6 @@ Lint/UselessAssign:
- src/invidious/helpers/errors.cr
- src/invidious/routes/**/*.cr
# Ignore shadowed variable `key` (it works for now, and that's
# a sensitive part of the code)
Lint/ShadowingOuterLocalVar:
Excluded:
- src/invidious/helpers/tokens.cr
Lint/NotNil:
Enabled: false

View file

@ -45,6 +45,7 @@ def sign_token(key, hash)
# TODO: figure out which "key" variable is used
# Ameba reports a warning for "Lint/ShadowingOuterLocalVar" on this
# variable, but it's preferable to not touch that (works fine atm).
# ameba:disable Lint/ShadowingOuterLocalVar
hash.each do |key, value|
next if key == "signature"