From b6c58cbafcd02a02fc710df318ef6f9ef8ebd977 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Sun, 11 Jan 2026 23:23:44 +0100 Subject: [PATCH] Fix `Lint/ShadowingOuterLocalVar` type of Ameba issues --- .ameba.yml | 6 ------ src/invidious/helpers/tokens.cr | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.ameba.yml b/.ameba.yml index bf218106..38199c36 100644 --- a/.ameba.yml +++ b/.ameba.yml @@ -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 diff --git a/src/invidious/helpers/tokens.cr b/src/invidious/helpers/tokens.cr index 9ea9918d..4675dede 100644 --- a/src/invidious/helpers/tokens.cr +++ b/src/invidious/helpers/tokens.cr @@ -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"