mirror of
https://github.com/gojp/goreportcard.git
synced 2026-01-28 22:39:05 +08:00
#92 strip /github.com/orgName/ from beginning of filenames
This commit is contained in:
@@ -146,6 +146,13 @@ outer:
|
||||
fs := fsMap[filename]
|
||||
if fs.Filename == "" {
|
||||
fs.Filename = filename
|
||||
if strings.HasPrefix(filename, "/github.com") {
|
||||
sp := strings.Split(filename, "/")
|
||||
if len(sp) > 3 {
|
||||
fs.Filename = strings.Join(sp[3:len(sp)], "/")
|
||||
}
|
||||
|
||||
}
|
||||
fs.FileURL = fileURL
|
||||
}
|
||||
err = fs.AddError(out.Text())
|
||||
|
||||
Reference in New Issue
Block a user