Skip to content

Commit

Permalink
Better report message in check sql script
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomello committed Feb 18, 2025
1 parent a1b950f commit d49065c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/check_sql_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def visit_ViewStmt(self, _ancestors, node):

def visit_CreateFunctionStmt(self, _ancestors, node):
if not node.replace:
self.error(node, "Consider using CREATE OR REPLACE FUNCTION")
fn_str = ("FUNCTION", "PROCEDURE")[node.is_procedure is True]
self.error(node, f"Consider using CREATE OR REPLACE {fn_str}")

return Skip

Expand Down

0 comments on commit d49065c

Please sign in to comment.