Skip to content

Commit 330487c

Browse files
author
luotianqi
committed
fix rebar.lock
1 parent 2cac58f commit 330487c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

analyzer/erlang/rebar.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
// parseRebarLock parse rebar.lock file
99
func parseRebarLock(dep *model.DepTree, file *model.FileData) []*model.DepTree {
1010
deps := []*model.DepTree{}
11-
// pkg\s*,\s*<<"(\S+)">>\s*,\s*<<"(\S+)">>
12-
reg := regexp.MustCompile(`pkg\s*,\s*<<"(\S+)">>\s*,\s*<<"(\S+)">>`)
11+
// <<"([\w\d]+)">>\S*?pkg,<<"[\w\d]+">>,<<"([.\d]+)">>
12+
reg := regexp.MustCompile(`<<"([\w\d]+)">>\S*?pkg,<<"[\w\d]+">>,<<"([.\d]+)">>`)
1313
for _, match := range reg.FindAllStringSubmatch(string(file.Data), -1) {
1414
sub := model.NewDepTree(dep)
1515
sub.Name = match[1]

0 commit comments

Comments
 (0)