From ee23fdca3dc42e8d0976ace1fb103411b19c908d Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 2 Mar 2025 16:49:18 +0100 Subject: [PATCH] fix(CI/Codestyle): Escape all MySQL keywords and skip /* comments (#21631) --- apps/codestyle/codestyle-sql.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/apps/codestyle/codestyle-sql.py b/apps/codestyle/codestyle-sql.py index 2bc0d3a91..06f8a0903 100644 --- a/apps/codestyle/codestyle-sql.py +++ b/apps/codestyle/codestyle-sql.py @@ -177,6 +177,10 @@ def semicolon_check(file: io, file_path: str) -> None: for line_number, line in enumerate(lines, start=1): if line.startswith('--'): continue + if line.startswith('/*'): + continue + if line.startswith('*/'): + continue # Remove trailing whitespace including newline # Remove comments from the line stripped_line = line.split('--', 1)[0].strip() @@ -231,10 +235,22 @@ def backtick_check(file: io, file_path: str) -> None: words = re.findall(r'\b(?