Skip to content

Commit

Permalink
fix(CI/Codestyle): Escape BETWEEN and skip /* comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitzunu committed Mar 2, 2025
1 parent 544878c commit f84c433
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/codestyle/codestyle-sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -234,7 +238,7 @@ def backtick_check(file: io, file_path: str) -> None:
# Skip SQL keywords
if word.upper() in {"SELECT", "FROM", "JOIN", "WHERE", "GROUP", "BY", "ORDER",
"DELETE", "UPDATE", "INSERT", "INTO", "SET", "VALUES", "AND",
"IN", "OR", "REPLACE", "NOT"}:
"IN", "OR", "REPLACE", "NOT", "BETWEEN"}:
continue

# Make sure the word is enclosed in backticks
Expand Down

0 comments on commit f84c433

Please sign in to comment.