Skip to content

Commit 009676f

Browse files
rollback: parse.go
1 parent aa736ab commit 009676f

File tree

1 file changed

+1
-1
lines changed
  • sqle/cmd/scannerd/scanners/common

1 file changed

+1
-1
lines changed

sqle/cmd/scannerd/scanners/common/parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func Parse(_ context.Context, sqlText string) ([]driverV2.Node, error) {
4646
func clearComments(sqlText string) string {
4747
// 将注释替换为一个空格,防止语句粘连
4848
sqlText = regexp.MustCompile(`(?s)/\*.*?\*/`).ReplaceAllString(sqlText, " ")
49-
// sqlText = regexp.MustCompile(`--.*`).ReplaceAllString(sqlText, " ")
49+
sqlText = regexp.MustCompile(`--.*`).ReplaceAllString(sqlText, " ")
5050
// 去除结尾分号后的内容
5151
idx := strings.Index(sqlText, ";")
5252
if idx >= 0 {

0 commit comments

Comments
 (0)