1. "first keyword: --"  cosmetic bug
2. re error
This commit is contained in:
tao.chen
2026-06-22 11:31:12 +08:00
parent 6a6df9abf8
commit 87795131a3
3 changed files with 34 additions and 3 deletions
@@ -32,7 +32,7 @@ import os
SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, SCRIPTS_DIR)
from sql_guard import assert_select_or_insert # noqa: E402
from sql_guard import assert_select_or_insert, first_keyword # noqa: E402
def read_sql() -> str:
@@ -51,7 +51,7 @@ def main() -> int:
except ValueError as e:
print(f"FAIL - {e}")
return 1
first = body.split(None, 1)[0].lower()
first = first_keyword(sql)
print(f"PASS - first keyword: {first}, body length: {len(body)}")
return 0