feat(lint): lint PL/pgSQL function and DO bodies, report body syntax errors
This commit is contained in:
@@ -93,6 +93,12 @@ func (e *Engine) Check(sql, file string) ([]diagnostics.Diagnostic, error) {
|
||||
all = append(all, found...)
|
||||
}
|
||||
|
||||
bodies := e.checkBodies(sql, result.Stmts)
|
||||
for i := range bodies {
|
||||
bodies[i].File = file
|
||||
}
|
||||
all = append(all, bodies...)
|
||||
|
||||
sort.Slice(all, func(i, j int) bool {
|
||||
if all[i].Line != all[j].Line {
|
||||
return all[i].Line < all[j].Line
|
||||
|
||||
Reference in New Issue
Block a user