Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/app/spec/naming_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

Expand Down
6 changes: 6 additions & 0 deletions backend/tests/test_naming_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading