From c0f2e8c2932af21b2c5d985b45687560044ee6bd Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Fri, 7 Aug 2026 13:11:20 +0000 Subject: [PATCH] Fix system_user naming lint bug --- backend/app/spec/naming_lint.py | 2 +- backend/tests/test_naming_lint.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/app/spec/naming_lint.py b/backend/app/spec/naming_lint.py index da403153..f31e53bf 100644 --- a/backend/app/spec/naming_lint.py +++ b/backend/app/spec/naming_lint.py @@ -32,7 +32,7 @@ do else end except false fetch for foreign from grant group having in initially intersect into lateral leading limit localtime localtimestamp not null offset on only or order placing primary references returning select - session_user some symmetric table then to trailing true union unique user + session_user some symmetric system_user table then to trailing true union unique user using variadic when where window with""".split() ) diff --git a/backend/tests/test_naming_lint.py b/backend/tests/test_naming_lint.py index f971a942..ff3b3ea3 100644 --- a/backend/tests/test_naming_lint.py +++ b/backend/tests/test_naming_lint.py @@ -25,6 +25,12 @@ def test_flags_reserved_word_table_and_column(): assert report["summary"]["high"] >= 2 +def test_flags_system_user_is_reserved(): + report = lint_naming(_snap({"system_user": ["id"]})) + assert ("reserved_word", "high") in _cats(report) + assert report["summary"]["high"] == 1 + + def test_flags_identifier_requiring_quotes(): report = lint_naming(_snap({"MyTable": ["id"], "member": ["first-name", "2fa_flag"]})) cats = _cats(report)